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>
This commit is contained in:
Dirk Hohndel 2013-09-19 22:58:53 -05:00
parent 46b125782e
commit 6881f52739

View file

@ -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