mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Make Cancel work in dive planner dialog
With this a partially planned dive is indeed thrown away when hitting Cancel. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ab7aecf16e
commit
ae3886b987
1 changed files with 8 additions and 0 deletions
|
@ -732,6 +732,14 @@ void input_plan()
|
|||
gtk_widget_show_all(planner);
|
||||
if (gtk_dialog_run(GTK_DIALOG(planner)) == GTK_RESPONSE_ACCEPT) {
|
||||
plan(&diveplan, &cache_data, &planned_dive);
|
||||
} else {
|
||||
if (planned_dive) {
|
||||
/* we have added a dive during the dynamic construction
|
||||
* in the dialog; get rid of it */
|
||||
delete_single_dive(dive_table.nr - 1);
|
||||
report_dives(FALSE, FALSE);
|
||||
planned_dive = NULL;
|
||||
}
|
||||
}
|
||||
gtk_widget_destroy(planner);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue