diff options
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 407436b17..ad39c433e 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -98,6 +98,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), connect(action, &QAction::triggered, this, &MainTab::closeWarning); ui.multiDiveWarningMessage->addAction(action); + action = new QAction(tr("Undo"), this); + connect(action, &QAction::triggered, Command::undoAction(this), &QAction::trigger); + connect(action, &QAction::triggered, this, &MainTab::closeWarning); + ui.multiDiveWarningMessage->addAction(action); + QShortcut *closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), this); connect(closeKey, SIGNAL(activated()), this, SLOT(escDetected())); |