summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--divelist-gtk.c2
-rw-r--r--gtk-gui.c4
-rw-r--r--profile.c2
-rw-r--r--qt-ui/mainwindow.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/divelist-gtk.c b/divelist-gtk.c
index 0c26430c1..fc90cdf26 100644
--- a/divelist-gtk.c
+++ b/divelist-gtk.c
@@ -1268,7 +1268,7 @@ static void delete_selected_dives_cb(GtkWidget *menuitem, GtkTreePath *path)
/* if no dives are selected at this point clear the display widgets */
if (!amount_selected) {
- selected_dive = 0;
+ selected_dive = -1;
process_selected_dives();
clear_stats_widgets();
clear_equipment_widgets();
diff --git a/gtk-gui.c b/gtk-gui.c
index 389257817..d24456251 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -315,7 +315,7 @@ static void file_close(GtkWidget *w, gpointer data)
mark_divelist_changed(FALSE);
/* clear the selection and the statistics */
- selected_dive = 0;
+ selected_dive = -1;
process_selected_dives();
clear_stats_widgets();
clear_events();
@@ -1840,7 +1840,7 @@ void MainWindow::on_actionClose_triggered()
mark_divelist_changed(FALSE);
/* clear the selection and the statistics */
- selected_dive = 0;
+ selected_dive = -1;
process_selected_dives();
clear_stats_widgets();
clear_events();
diff --git a/profile.c b/profile.c
index 276641bb2..41e6724bb 100644
--- a/profile.c
+++ b/profile.c
@@ -15,7 +15,7 @@
#include "libdivecomputer/parser.h"
#include "libdivecomputer/version.h"
-int selected_dive = 0;
+int selected_dive = -1;
char zoomed_plot = 0;
char dc_number = 0;
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 0b7f9f25d..d676549d1 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -123,7 +123,7 @@ void MainWindow::on_actionClose_triggered()
mark_divelist_changed(FALSE);
/* clear the selection and the statistics */
- selected_dive = 0;
+ selected_dive = -1;
//WARNING: Port this to Qt.
//process_selected_dives();