diff options
author | Rodrigo Severo <rodrigo@fabricadeideias.com> | 2014-01-13 22:11:14 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-14 21:18:28 +0700 |
commit | 3a3d61ba5332144ce226f59a9d79927e411de0a7 (patch) | |
tree | ecbbef0c3b87d690227b98ef3754dbcc918a732f /qt-ui/divelogimportdialog.cpp | |
parent | 13d4c48e6a9498d37ecd26dcc55b829da6f207be (diff) | |
download | subsurface-3a3d61ba5332144ce226f59a9d79927e411de0a7.tar.gz |
Pre-configured CSV imports should also set the field separator
Pre-configured imports in Import Dive Log File for CSV files should also
set the pre-defined field separator.
[Dirk Hohndel: cleaned up hideous whitespace]
Signed-off-by:Rodrigo Severo <rodrigo@fabricadeideias.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 55907a39d..2a7166a98 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -24,7 +24,7 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : ui->CSVSeparator->addItem("Tab"); ui->CSVSeparator->addItem(","); - ui->CSVSeparator->addItem(";"); + ui->CSVSeparator->addItem(";"); ui->knownImports->setCurrentIndex(1); connect(ui->CSVDepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); @@ -90,6 +90,11 @@ void DiveLogImportDialog::on_knownImports_currentIndexChanged(int index) SET_VALUE_AND_CHECKBOX(CSVpo2, po2CheckBox, CSVApps[index].po2); SET_VALUE_AND_CHECKBOX(CSVcns, cnsCheckBox, CSVApps[index].cns); SET_VALUE_AND_CHECKBOX(CSVstopdepth, stopdepthCheckBox, CSVApps[index].stopdepth); + ui->CSVSeparator->blockSignals(true); + int separator_index = ui->CSVSeparator->findText(CSVApps[index].separator); + if (separator_index != -1) + ui->CSVSeparator->setCurrentIndex(separator_index); + ui->CSVSeparator->blockSignals(false); } void DiveLogImportDialog::unknownImports(bool arg1) |