diff options
author | Jim Evins <evins@snaught.com> | 2010-05-30 22:58:33 -0400 |
---|---|---|
committer | Jim Evins <evins@snaught.com> | 2010-05-30 23:03:03 -0400 |
commit | 55b7dda6b69c4f1a25734152fd6b69b72ee3f385 (patch) | |
tree | 160ae9612fa740e21094ccaae4da8782b9396f1b | |
parent | c555edf9c5195b45812383d699e6021417dd96cd (diff) |
Fix selection problem.
Clear existing paths before creating new test paths. This would occasionally
cause the wrong object to be selected because the in_fill or in_stroke
tests would be satisfied using left-over paths from previous tests.
-rw-r--r-- | src/label-barcode.c | 1 | ||||
-rw-r--r-- | src/label-box.c | 1 | ||||
-rw-r--r-- | src/label-ellipse.c | 1 | ||||
-rw-r--r-- | src/label-image.c | 1 | ||||
-rw-r--r-- | src/label-line.c | 1 | ||||
-rw-r--r-- | src/label-text.c | 2 |
6 files changed, 7 insertions, 0 deletions
diff --git a/src/label-barcode.c b/src/label-barcode.c index 0e12b3d..fe108fd 100644 --- a/src/label-barcode.c +++ b/src/label-barcode.c @@ -566,6 +566,7 @@ object_at (glLabelObject *object, gl_label_object_get_size (object, &w, &h); + cairo_new_path (cr); cairo_rectangle (cr, 0.0, 0.0, w, h); if (cairo_in_fill (cr, x, y)) diff --git a/src/label-box.c b/src/label-box.c index 2d714f8..3088ef1 100644 --- a/src/label-box.c +++ b/src/label-box.c @@ -477,6 +477,7 @@ object_at (glLabelObject *object, gl_label_object_get_size (object, &w, &h); + cairo_new_path (cr); cairo_rectangle (cr, 0.0, 0.0, w, h); if (cairo_in_fill (cr, x, y)) diff --git a/src/label-ellipse.c b/src/label-ellipse.c index 6dbc789..5de25a7 100644 --- a/src/label-ellipse.c +++ b/src/label-ellipse.c @@ -478,6 +478,7 @@ object_at (glLabelObject *object, gl_label_object_get_size (object, &w, &h); + cairo_new_path (cr); gl_cairo_ellipse_path (cr, w/2, h/2); if (cairo_in_fill (cr, x, y)) diff --git a/src/label-image.c b/src/label-image.c index b24d1a7..f957351 100644 --- a/src/label-image.c +++ b/src/label-image.c @@ -459,6 +459,7 @@ object_at (glLabelObject *object, gl_label_object_get_size (object, &w, &h); + cairo_new_path (cr); cairo_rectangle (cr, 0.0, 0.0, w, h); if (cairo_in_fill (cr, x, y)) diff --git a/src/label-line.c b/src/label-line.c index 0b58815..e8b66e9 100644 --- a/src/label-line.c +++ b/src/label-line.c @@ -386,6 +386,7 @@ object_at (glLabelObject *object, gl_label_object_get_size (object, &w, &h); + cairo_new_path (cr); cairo_move_to (cr, 0, 0); cairo_line_to (cr, w, h); diff --git a/src/label-text.c b/src/label-text.c index 7206bed..1cb38ae 100644 --- a/src/label-text.c +++ b/src/label-text.c @@ -1208,6 +1208,7 @@ object_at (glLabelObject *object, if ( (x >= 0) && (x <= w) && (y >= 0) && (y <= h) ) { + cairo_new_path (cr); set_text_path (GL_LABEL_TEXT (object), cr, TRUE, NULL); if (cairo_in_fill (cr, x, y)) { @@ -1217,6 +1218,7 @@ object_at (glLabelObject *object, if (gl_label_object_is_selected (object)) { + cairo_new_path (cr); cairo_rectangle (cr, 0, 0, w, h); if (cairo_in_stroke (cr, x, y)) { |