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>
This commit is contained in:
Dirk Hohndel 2013-05-16 09:09:06 -07:00
parent 69da208080
commit 1ba901fed6
3 changed files with 3 additions and 3 deletions

View file

@ -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();