mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: clear undo history on load / import
Keeping undo-history across load makes little sense. The user was expressly reminded that they have unsaved work. For import (from other logs or the dive-computer) an undo-functionality would be desirable. Nevertheless, this is rather complex since new and old dives are merged. Implementation would require a finer backend<->undocommand interface. Thus, leave this for now until more experience with the undo system is acquired. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
014c04f8bd
commit
c30efc95d4
3 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue