summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-19 22:58:53 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-19 22:58:53 -0500
commit6881f527390ed7e386fee60176c9b8bba9bfb316 (patch)
treea15c05e27ecfa9420ee523988a9d4722297f105b /qt-ui
parent46b125782ee0e8af84c929deaa1ed34f53e7bcd0 (diff)
downloadsubsurface-6881f527390ed7e386fee60176c9b8bba9bfb316.tar.gz
Hook up cancelling out of adding a dive
This was surprisingly easy - which of course has me worried that I'm missing something that I should do when cancelling out of this dialog. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index fcde96e0a..a42ce68dd 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -470,6 +470,14 @@ void MainTab::rejectChanges()
ui->location->setPalette(p);
ui->divemaster->setPalette(p);
ui->suit->setPalette(p);
+ if (editMode == ADD) {
+ // clean up
+ delete_single_dive(selected_dive);
+ selected_dive = -1;
+ DivePlannerPointsModel::instance()->cancelPlan();
+ mainWindow()->showProfile();
+ mainWindow()->refreshDisplay();
+ }
editMode = NONE;
}
#undef EDIT_TEXT2