summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/command_base.cpp2
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/desktop-widgets/command_base.cpp b/desktop-widgets/command_base.cpp
index 9316135dd..bef9da09c 100644
--- a/desktop-widgets/command_base.cpp
+++ b/desktop-widgets/command_base.cpp
@@ -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;
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 810d4574c..407436b17 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -80,6 +80,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
connect(&diveListNotifier, &DiveListNotifier::divesChanged, this, &MainTab::divesChanged);
connect(&diveListNotifier, &DiveListNotifier::tripChanged, this, &MainTab::tripChanged);
connect(&diveListNotifier, &DiveListNotifier::diveSiteChanged, this, &MainTab::diveSiteEdited);
+ connect(&diveListNotifier, &DiveListNotifier::commandExecuted, this, &MainTab::closeWarning);
connect(ui.editDiveSiteButton, &QToolButton::clicked, MainWindow::instance(), &MainWindow::startDiveSiteEdit);
connect(ui.location, &DiveLocationLineEdit::entered, MapWidget::instance(), &MapWidget::centerOnIndex);
@@ -200,7 +201,7 @@ void MainTab::closeMessage()
void MainTab::closeWarning()
{
- ui.multiDiveWarningMessage->animatedHide();
+ ui.multiDiveWarningMessage->hide();
}
void MainTab::displayMessage(QString str)
@@ -723,7 +724,7 @@ void MainTab::divesEdited(int i)
return;
ui.multiDiveWarningMessage->setCloseButtonVisible(false);
ui.multiDiveWarningMessage->setText(tr("Warning: edited %1 dives").arg(i));
- ui.multiDiveWarningMessage->animatedShow();
+ ui.multiDiveWarningMessage->show();
}
static QStringList stringToList(const QString &s)