From 6881f527390ed7e386fee60176c9b8bba9bfb316 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 19 Sep 2013 22:58:53 -0500 Subject: 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 --- qt-ui/maintab.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qt-ui/maintab.cpp') 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 -- cgit v1.2.3-70-g09d2