Skip to content

Commit cec6b82

Browse files
committed
Fix loading of last used settings in Import CSV dialog
Fix the loading of the last used import settings in the Import CSV dialog when the "Other" option has been used in one of the dropdown boxes.
1 parent c70a1fc commit cec6b82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ImportCsvDialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ void ImportCsvDialog::setQuoteChar(const QChar& c)
710710
int index = combo->findText(c);
711711
if(index == -1)
712712
{
713-
combo->setCurrentIndex(combo->count());
713+
combo->setCurrentIndex(combo->count() - 1);
714714
ui->editCustomQuote->setText(c);
715715
}
716716
else
@@ -738,7 +738,7 @@ void ImportCsvDialog::setSeparatorChar(const QChar& c)
738738
int index = combo->findText(sText);
739739
if(index == -1)
740740
{
741-
combo->setCurrentIndex(combo->count());
741+
combo->setCurrentIndex(combo->count() - 1);
742742
ui->editCustomSeparator->setText(c);
743743
}
744744
else
@@ -762,7 +762,7 @@ void ImportCsvDialog::setEncoding(const QString& sEnc)
762762
int index = combo->findText(sEnc);
763763
if(index == -1)
764764
{
765-
combo->setCurrentIndex(combo->count());
765+
combo->setCurrentIndex(combo->count() - 1);
766766
ui->editCustomEncoding->setText(sEnc);
767767
}
768768
else

0 commit comments

Comments
 (0)