mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
f51e402e04
commit
a20c22d907
3 changed files with 11 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "command_base.h"
|
||||
#include "core/qthelper.h" // for updateWindowTitle()
|
||||
#include "core/subsurface-qt/DiveListNotifier.h"
|
||||
|
||||
namespace Command {
|
||||
|
||||
|
@ -42,6 +43,7 @@ bool execute(Base *cmd)
|
|||
{
|
||||
if (cmd->workToBeDone()) {
|
||||
undoStack.push(cmd);
|
||||
emit diveListNotifier.commandExecuted();
|
||||
return true;
|
||||
} else {
|
||||
delete cmd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue