summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-14 08:18:26 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-14 08:18:26 -0300
commitb0374047dd6a31d8b16c6991ee0ffc51c198569e (patch)
treecf950820fc57fdeaac6ae81f43b80b62a73e4054 /divelist.c
parent5868b37e6bde1eaa6da09aac5e269557d94d7641 (diff)
downloadsubsurface-b0374047dd6a31d8b16c6991ee0ffc51c198569e.tar.gz
code to show profile again
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/divelist.c b/divelist.c
index deab1b05c..1398c78e8 100644
--- a/divelist.c
+++ b/divelist.c
@@ -144,7 +144,7 @@ int trip_has_selected_dives(dive_trip_t *trip)
return 0;
}
-/* Get the values as we want to show them. Whole feet. But meters with one decimal for
+/* Get the values as we want to show them. Whole feet. But meters with one decimal for
* values less than 20m, without decimals for larger values */
void get_depth_values(int depth, int *depth_int, int *depth_decimal, int *show_decimal)
{
@@ -924,9 +924,11 @@ void merge_dive_index(int i, struct dive *a)
void select_dive(int idx)
{
struct dive *dive = get_dive(idx);
- if (dive && !dive->selected) {
- dive->selected = 1;
- amount_selected++;
+ if (dive) {
+ if (!dive->selected){
+ dive->selected = 1;
+ amount_selected++;
+ }
selected_dive = idx;
}
}