mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: use QUndoStack::isClean() to determine unsaved changes
Properly implement the unsaved-changes flag(s). Since we currently have two kinds of changes, there are two flags: 1) dive_list_changed in divelist.c marks non-undoable changes. This flag is only cleared on save or load. 2) QUndoStack::isClean() is used to determine the state of undoable changes. Every time the user returns to the state where they saved, this flag is cleared. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
837ab6c90b
commit
58f2e5f77c
9 changed files with 46 additions and 31 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include "command_edit_trip.h"
|
||||
#include "command_private.h"
|
||||
#include "core/divelist.h" // for mark_divelist_changed(). TODO: remove
|
||||
#include "core/qthelper.h"
|
||||
|
||||
namespace Command {
|
||||
|
@ -27,7 +26,6 @@ void EditTripBase::undo()
|
|||
value = old;
|
||||
|
||||
emit diveListNotifier.tripChanged(trip, fieldId());
|
||||
mark_divelist_changed(true);
|
||||
}
|
||||
|
||||
// Undo and redo do the same as just the stored value is exchanged
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue