diff options
-rw-r--r-- | desktop-widgets/divelogimportdialog.cpp | 2 | ||||
-rw-r--r-- | desktop-widgets/downloadfromdivecomputer.cpp | 2 | ||||
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index c72f179e4..e10f9b7af 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -7,6 +7,7 @@ #include <QDrag> #include <QMimeData> #include <QRegExp> +#include <QUndoStack> #include "core/qthelper.h" #include "core/import-csv.h" @@ -1008,6 +1009,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() } process_imported_dives(&table, false, false); + MainWindow::instance()->undoStack->clear(); MainWindow::instance()->refreshDisplay(); } diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index 1e239c378..e63de8f56 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -14,6 +14,7 @@ #include <QMessageBox> #include <QShortcut> #include <QTimer> +#include <QUndoStack> DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f), downloading(false), @@ -507,6 +508,7 @@ void DownloadFromDCWidget::on_ok_clicked() // first new dive) and select it again after processing all the dives int uniqId = downloadTable.dives[downloadTable.nr - 1]->id; process_imported_dives(&downloadTable, preferDownloaded(), true); + MainWindow::instance()->undoStack->clear(); // after process_imported_dives does any merging or resorting needed, we need // to recreate the model for the dive list so we can select the newest dive MainWindow::instance()->recreateDiveList(); diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index fdd73d943..1cc82b7c1 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -618,6 +618,7 @@ void MainWindow::on_actionCloudstorageopen_triggered() if (!parse_file(fileNamePtr.data(), &dive_table)) setCurrentFile(fileNamePtr.data()); process_loaded_dives(); + undoStack->clear(); hideProgressBar(); refreshDisplay(); } @@ -1740,6 +1741,7 @@ void MainWindow::importFiles(const QStringList fileNames) parse_file(fileNamePtr.data(), &table); } process_imported_dives(&table, false, false); + undoStack->clear(); refreshDisplay(); } @@ -1762,6 +1764,7 @@ void MainWindow::loadFiles(const QStringList fileNames) hideProgressBar(); updateRecentFiles(); process_loaded_dives(); + undoStack->clear(); refreshDisplay(); |