summaryrefslogtreecommitdiffstats
path: root/info.c
diff options
context:
space:
mode:
authorGravatar Henrik Brautaset Aronsen <subsurface@henrik.synth.no>2012-11-04 20:35:59 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-05 09:05:02 -0800
commit37e3ade2e27b64f0696102e4ec421176ae430ffd (patch)
tree8ade4ed484093febb1d5e2fd8457499b46081105 /info.c
parent45fce18fb24fe291f8b1f5c65ff95ea0a5046a33 (diff)
downloadsubsurface-37e3ade2e27b64f0696102e4ec421176ae430ffd.tar.gz
Repair broken Add Dive menu item
Lubomir's commit aec904b612cbee57f8bb5c3289a120b69c9ade24 broke the Add Dive menu item: The Edit Dive dialogue didn't show up after the initial dialogue. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'info.c')
-rw-r--r--info.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/info.c b/info.c
index 6501150a2..ee27c4535 100644
--- a/info.c
+++ b/info.c
@@ -792,10 +792,11 @@ int edit_multi_dive_info(struct dive *single_dive)
return success;
}
-int edit_dive_info(struct dive *dive)
+int edit_dive_info(struct dive *dive, gboolean newdive)
{
- if (!dive || !amount_selected)
+ if (!dive || (!newdive && !amount_selected))
return 0;
+
return edit_multi_dive_info(dive);
}
@@ -938,7 +939,7 @@ int add_new_dive(struct dive *dive)
if (!dive_time_widget(dive))
return 0;
- return edit_dive_info(dive);
+ return edit_dive_info(dive, TRUE);
}
GtkWidget *extended_dive_info_widget(void)