summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-05-24 21:38:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-06-15 11:20:49 -0700
commita20c22d9072f1a4fcb2b346a934c138df9f14a47 (patch)
treec411cfaaa0cc3b8f9b9cd4fc0c4110800d8ecb73 /core/subsurface-qt
parentf51e402e04bc1f15da7b9e4d4f57a4e4c5c28490 (diff)
downloadsubsurface-a20c22d9072f1a4fcb2b346a934c138df9f14a47.tar.gz
Undo: hide multi-dive-edit warning message on subsequent edit
When a different field is edited, hide any old multi-dive-edit warning message. The reason is that we might want to add an "undo" button to the message. But this will undo the wrong command if we don't hide the message. Sadly, this means that we can't use animated show / hide, because an animatedHide() followed immediately by an animatedShow() does not necessarily show the message. In other words, and animatedShow() does not interupt a started animatedHide()!? Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/subsurface-qt')
-rw-r--r--core/subsurface-qt/DiveListNotifier.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/subsurface-qt/DiveListNotifier.h b/core/subsurface-qt/DiveListNotifier.h
index 95a67a1e8..06cd3f89e 100644
--- a/core/subsurface-qt/DiveListNotifier.h
+++ b/core/subsurface-qt/DiveListNotifier.h
@@ -81,6 +81,12 @@ signals:
void diveSiteDiveCountChanged(dive_site *ds);
void diveSiteChanged(dive_site *ds, int field); // field according to LocationInformationModel
void diveSiteDivesChanged(dive_site *ds); // The dives associated with that site changed
+
+ // This signal is emited every time a command is executed.
+ // This is used to hide an old multi-dives-edited warning message.
+ // This is necessary, so that the user can't click on the "undo" button and undo
+ // an unrelated command.
+ void commandExecuted();
public:
// Desktop uses the QTreeView class to present the list of dives. The layout
// of this class gives us a very fundamental problem, as we can not easily