mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Undo: add undo button to multi-dive-edited warning message
Simply connect the button the the undo-action and the hide-message action. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
a20c22d907
commit
e329a53aab
1 changed files with 5 additions and 0 deletions
|
@ -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()));
|
||||
|
||||
|
|
Loading…
Reference in a new issue