mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: reject plan if escape key is pressed
This seems intuitive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
49053e86aa
commit
09403f3724
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <QSettings>
|
||||
#include <QTableView>
|
||||
#include <QColor>
|
||||
#include <QShortcut>
|
||||
|
||||
#include <algorithm>
|
||||
#include <string.h>
|
||||
|
@ -282,6 +283,8 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg
|
|||
// Creating (and canceling) the plan
|
||||
connect(ui.buttonBox, SIGNAL(accepted()), plannerModel, SLOT(createPlan()));
|
||||
connect(ui.buttonBox, SIGNAL(rejected()), plannerModel, SLOT(cancelPlan()));
|
||||
QShortcut *closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), this);
|
||||
connect(closeKey, SIGNAL(activated()), plannerModel, SLOT(cancelPlan()));
|
||||
|
||||
/* set defaults. */
|
||||
ui.startTime->setTime(QTime(1, 0));
|
||||
|
|
Loading…
Add table
Reference in a new issue