]> git.street.me.uk Git - andy/viking.git/commitdiff
SF Bugs#146: Fix showing elevation gain/loss in track properties.
authorRob Norris <rw_norris@hotmail.com>
Thu, 8 Jun 2017 20:00:59 +0000 (21:00 +0100)
committerRob Norris <rw_norris@hotmail.com>
Thu, 8 Jun 2017 20:05:30 +0000 (21:05 +0100)
Ensure when only height gain the values are still displayed.

src/viktrwlayer_propwin.c

index d1d8a48bbf2ceb1d7ccdc383a80e2e05678af61a..40b8da29ca8a4395c66460e288cb0d0f1a8c4d62 100644 (file)
@@ -3353,7 +3353,7 @@ void vik_trw_layer_propwin_run ( GtkWindow *parent,
   widgets->w_elev_range = content[cnt++] = ui_label_new_selectable ( tmp_buf );
 
   vik_track_get_total_elevation_gain(tr, &max_alt, &min_alt );
-  if ( min_alt == VIK_DEFAULT_ALTITUDE )
+  if ( (min_alt == VIK_DEFAULT_ALTITUDE) && (max_alt == VIK_DEFAULT_ALTITUDE) )
     g_snprintf(tmp_buf, sizeof(tmp_buf), _("No Data"));
   else {
     switch (height_units) {