From: Jocelyn Jaubert Date: Fri, 22 May 2009 10:13:32 +0000 (+0200) Subject: Fix #570956: change saved_width to 1 X-Git-Url: https://git.street.me.uk/andy/viking.git/commitdiff_plain/00f21502bed19f603b7981c609a5b959807bf645 Fix #570956: change saved_width to 1 The bug is in fact caused because we try to save data which is not available on the picture drawn (the width of the saved data exceed the pixmap). We only draw a line, so only a 1-pixel-large column needs to be saved. --- diff --git a/src/viktrwlayer_propwin.c b/src/viktrwlayer_propwin.c index eb96f274..f23c0343 100644 --- a/src/viktrwlayer_propwin.c +++ b/src/viktrwlayer_propwin.c @@ -149,7 +149,7 @@ static VikTrackpoint *set_center_at_graph_position(gdouble event_x, gint img_wid static void draw_graph_mark(GtkWidget *image, gdouble event_x, gint img_width, GdkGC *gc, PropSaved *saved_img) { GdkPixmap *pix; - const int saved_width = 5; + const int saved_width = 1; /* the pixmap = margin + graph area */ gdouble x = event_x - img_width/2 + PROFILE_WIDTH/2 + MARGIN/2;