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.
static void draw_graph_mark(GtkWidget *image, gdouble event_x, gint img_width, GdkGC *gc, PropSaved *saved_img)
{
GdkPixmap *pix;
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;
/* the pixmap = margin + graph area */
gdouble x = event_x - img_width/2 + PROFILE_WIDTH/2 + MARGIN/2;