summaryrefslogtreecommitdiffstats
path: root/info.c
diff options
context:
space:
mode:
Diffstat (limited to 'info.c')
-rw-r--r--info.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/info.c b/info.c
index cccc6497b..d9379ac68 100644
--- a/info.c
+++ b/info.c
@@ -496,6 +496,7 @@ int edit_multi_dive_info(struct dive *single_dive)
GtkWidget *dialog, *vbox;
struct dive_info info;
struct dive *master;
+ gboolean multi;
dialog = gtk_dialog_new_with_buttons("Dive Info",
GTK_WINDOW(main_window),
@@ -508,7 +509,22 @@ int edit_multi_dive_info(struct dive *single_dive)
master = single_dive;
if (!master)
master = current_dive;
- dive_info_widget(vbox, master, &info, !single_dive);
+
+ /* See if we should use multi dive mode */
+ multi = FALSE;
+ if (!single_dive) {
+ int i;
+ struct dive *dive;
+
+ for_each_dive(i, dive) {
+ if (dive != master && dive->selected) {
+ multi = TRUE;
+ break;
+ }
+ }
+ }
+
+ dive_info_widget(vbox, master, &info, multi);
show_dive_equipment(master, W_IDX_SECONDARY);
save_equipment_data(master);
gtk_widget_show_all(dialog);