]> git.street.me.uk Git - andy/viking.git/commitdiff
Fix #570956: change saved_width to 1
authorJocelyn Jaubert <jocelyn.jaubert@gmail.com>
Fri, 22 May 2009 10:13:32 +0000 (12:13 +0200)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Fri, 22 May 2009 10:14:54 +0000 (12:14 +0200)
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.

src/viktrwlayer_propwin.c

index eb96f274ec052231c0a2f91ca42bc1c075a8c4ec..f23c0343dab1ad88b70fd54993e1ee2501e6ad5f 100644 (file)
@@ -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;