[glabels] Fix selection problem.
- From: Jim Evins <jimevins src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glabels] Fix selection problem.
- Date: Mon, 31 May 2010 03:03:16 +0000 (UTC)
commit 55b7dda6b69c4f1a25734152fd6b69b72ee3f385
Author: Jim Evins <evins snaught com>
Date: Sun May 30 22:58:33 2010 -0400
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.
src/label-barcode.c | 1 +
src/label-box.c | 1 +
src/label-ellipse.c | 1 +
src/label-image.c | 1 +
src/label-line.c | 1 +
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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]