mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Correctly set the unselected dive.
The selected dive was being set to zero when the program started, but zero is actually the first dive. There were workarounds on the gtk code for that probably Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
a55a2e5d88
commit
30297ebd4b
4 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue