From: Quy Tonthat Date: Mon, 15 Oct 2007 04:53:40 +0000 (+0000) Subject: Add more room to the top of altitude-distance graph. X-Git-Url: https://git.street.me.uk/andy/viking.git/commitdiff_plain/3220e3365d3c899468f8b178552aeb19659ac3d7?ds=inline;hp=b42009f666412ebe82e0bba35bac163aa09c22a1 Add more room to the top of altitude-distance graph. Signed-off-by: Quy Tonthat --- diff --git a/ChangeLog b/ChangeLog index b8a34e2e..e3c1a4f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-15 +Quy Tonthat : + * Add more room to the top of elevation-distance graph. + 2007-10-14 Evan Battaglia * Fix plotting of DEM elevation data (subtract min altitude) diff --git a/src/viktrwlayer_propwin.c b/src/viktrwlayer_propwin.c index 73a0b930..769a1c60 100644 --- a/src/viktrwlayer_propwin.c +++ b/src/viktrwlayer_propwin.c @@ -165,6 +165,7 @@ static void draw_dem_alt_speed_dist(VikTrack *tr, GdkDrawable *pix, GdkGC *alt_g if (!isnan(VIK_TRACKPOINT(iter->data)->speed)) max_speed = MAX(max_speed, VIK_TRACKPOINT(iter->data)->speed); } + max_speed = max_speed * 110 / 100; for (iter = tr->trackpoints->next; iter; iter = iter->next) { int x, y_alt, y_speed; @@ -216,8 +217,8 @@ GtkWidget *vik_trw_layer_create_profile ( GtkWidget *window, VikTrack *tr, gdoub minmax_alt(altitudes, min_alt, max_alt); - mina = *min_alt; - maxa = *max_alt; + mina = *min_alt; + maxa = *max_alt * 110 / 100; if (maxa-mina < MIN_ALT_DIFF) { maxa = mina + MIN_ALT_DIFF; }