diff options
| author | 2019-11-16 22:00:25 +0100 | |
|---|---|---|
| committer | 2020-03-10 09:25:49 -0700 | |
| commit | 3b6b9951ae0595c21dc35d95126e644babbfbc2d (patch) | |
| tree | 756d9521e34bf73bbe31d80bca2c7878a119d2cf /desktop-widgets | |
| parent | c8ec2f5b1ccd72d9ed5036bf9ecfec3b5f90964b (diff) | |
| download | subsurface-3b6b9951ae0595c21dc35d95126e644babbfbc2d.tar.gz | |
undo: clear undo-stack when clearing dive data
When the dive data is cleared, all pointers in the undo-stack become stale.
Desktop explicitly called Command::clear() in that case, but mobile doesn't.
Thus, move the clear() call into DiveTripModelBase::clear()
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
| -rw-r--r-- | desktop-widgets/mainwindow.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 9d2b31136..d995c7a36 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -547,7 +547,6 @@ void MainWindow::on_actionCloudstorageopen_triggered() if (!parse_file(fileNamePtr.data(), &dive_table, &trip_table, &dive_site_table)) setCurrentFile(fileNamePtr.data()); process_loaded_dives(); - Command::clear(); hideProgressBar(); refreshDisplay(); } @@ -1695,7 +1694,6 @@ void MainWindow::loadFiles(const QStringList fileNames) hideProgressBar(); updateRecentFiles(); process_loaded_dives(); - Command::clear(); refreshDisplay(); |