app: GimpRuler: clip position marker drawing to the ruler's allocation

so we don't overdraw when drawing out of expose.
This commit is contained in:
Michael Natterer 2011-04-20 00:31:59 +02:00
parent 3bf15d32e6
commit 59ea89234f
1 changed files with 5 additions and 1 deletions

View File

@ -1192,6 +1192,11 @@ gimp_ruler_draw_pos (GimpRuler *ruler)
gdouble position;
gdouble increment;
cairo_rectangle (cr,
allocation.x, allocation.y,
allocation.width, allocation.height);
cairo_clip (cr);
cairo_translate (cr, allocation.x, allocation.y);
/* If a backing store exists, restore the ruler */
@ -1202,7 +1207,6 @@ gimp_ruler_draw_pos (GimpRuler *ruler)
cairo_fill (cr);
}
position = gimp_ruler_get_position (ruler);
gimp_ruler_get_range (ruler, &lower, &upper, NULL);