aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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