summaryrefslogtreecommitdiffstats
path: root/divelist-gtk.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-16 09:09:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-16 09:10:11 -0700
commit1ba901fed670ecf55e44b0d8aafb78ede53c9105 (patch)
treeda43c705c9d498dffbd876cae1c3e023f9ab6cc1 /divelist-gtk.c
parent69da208080bf6af0af3b5a2adfa9347019272a57 (diff)
downloadsubsurface-1ba901fed670ecf55e44b0d8aafb78ede53c9105.tar.gz
Initialize / reset selected_dive to -1
The value of 0 that we used is actually a valid value and could cause confusion. Suggested-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist-gtk.c')
-rw-r--r--divelist-gtk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/divelist-gtk.c b/divelist-gtk.c
index e7194d87e..3f96193c5 100644
--- a/divelist-gtk.c
+++ b/divelist-gtk.c
@@ -1319,7 +1319,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();