From 68691c9d6d05ba28c8e0e8c837dcd32bb2eec42c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 11 Feb 2015 13:58:23 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui/mainwindow.cpp') 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; -- cgit v1.2.3-70-g09d2