aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 474ce0f55..2e4342511 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -1714,9 +1714,8 @@ void MainWindow::importFiles(const QStringList fileNames)
fileNamePtr = QFile::encodeName(fileNames.at(i));
parse_file(fileNamePtr.data(), &table, &trips);
}
- add_imported_dives(&table, &trips, false, false, true);
- Command::clear();
- refreshDisplay();
+ QString source = fileNames.size() == 1 ? fileNames[0] : tr("multiple files");
+ Command::importDives(&table, &trips, false, false, true, source);
}
void MainWindow::loadFiles(const QStringList fileNames)