diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-02-11 13:58:23 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-11 16:34:02 -0800 |
commit | 68691c9d6d05ba28c8e0e8c837dcd32bb2eec42c (patch) | |
tree | 309705eb75fa69d3730b372ecbee4b4bb7bfae38 /qt-ui/mainwindow.cpp | |
parent | 7d66dcd12d42db7c9e3f18be21615204588a66e3 (diff) | |
download | subsurface-68691c9d6d05ba28c8e0e8c837dcd32bb2eec42c.tar.gz |
Accept / Cancel location edit
Make it possible to cancel or accept the location edit and
get back to the mainwindow default state.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index c3226c0d0..51b0353be 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -112,6 +112,7 @@ MainWindow::MainWindow() : QMainWindow(), connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled())); connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget(), SLOT(printDecoPlan())); connect(mainTab, SIGNAL(requestDiveSiteEdit()), this, SLOT(enableDiveSiteEdit())); + connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(setDefaultState())); #ifdef NO_PRINTING ui.printPlan->hide(); ui.menuFile->removeAction(ui.actionPrint); @@ -217,6 +218,10 @@ void MainWindow::enableDiveSiteEdit() { setApplicationState("EditDiveSite"); } +void MainWindow::setDefaultState() { + setApplicationState("Default"); +} + void MainWindow::setLoadedWithFiles(bool f) { filesAsArguments = f; |