diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-04-22 13:20:27 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-22 13:20:27 -0700 |
commit | 6f7e3d04cb737515b03243adc638fbc03e565c4d (patch) | |
tree | 0a8070cea96fac183e9db345130fbe8064e53409 /qt-ui/divelogimportdialog.cpp | |
parent | 959077c66bd42d0b613a5ee54bc17fe3b9517bdd (diff) | |
download | subsurface-6f7e3d04cb737515b03243adc638fbc03e565c4d.tar.gz |
Handle XSLT based imports correctly
XSLT conversions create V2 XML files, but we shouldn't abort when we parse
those without having the user informed about the potential slowness - all
XSLT based imports are slow, anyway.
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, 5 insertions, 2 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index cccafdabf..763476d9f 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -574,6 +574,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) void DiveLogImportDialog::on_buttonBox_accepted() { + imported_via_xslt = true; QStringList r = resultModel->result(); if (ui->knownImports->currentText() != "Manual import") { for (int i = 0; i < fileNames.size(); ++i) { @@ -592,9 +593,10 @@ void DiveLogImportDialog::on_buttonBox_accepted() specialCSV.contains(ui->knownImports->currentIndex()) ? CSVApps[ui->knownImports->currentIndex()].name.toUtf8().data() : "csv", ui->CSVUnits->currentIndex(), delta.toUtf8().data() - ) < 0) + ) < 0) { + imported_via_xslt = false; return; - + } // Seabear CSV stores NDL and TTS in Minutes, not seconds struct dive *dive = dive_table.dives[dive_table.nr - 1]; for(int s_nr = 0 ; s_nr <= dive->dc.samples ; s_nr++) { @@ -667,6 +669,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() } process_dives(true, false); MainWindow::instance()->refreshDisplay(); + imported_via_xslt = false; } TagDragDelegate::TagDragDelegate(QObject *parent) : QStyledItemDelegate(parent) |