[gimp] app: return FALSE from gimp_canvas_item_hit() when the item is invisible
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: return FALSE from gimp_canvas_item_hit() when the item is invisible
- Date: Tue, 13 Jun 2017 22:18:19 +0000 (UTC)
commit 1bc52dad7170574e134640d7b80e89f7e22d4e10
Author: Michael Natterer <mitch gimp org>
Date: Wed Jun 14 00:15:09 2017 +0200
app: return FALSE from gimp_canvas_item_hit() when the item is invisible
app/display/gimpcanvasitem.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/app/display/gimpcanvasitem.c b/app/display/gimpcanvasitem.c
index 7d13d22..f7ea879 100644
--- a/app/display/gimpcanvasitem.c
+++ b/app/display/gimpcanvasitem.c
@@ -393,7 +393,10 @@ gimp_canvas_item_hit (GimpCanvasItem *item,
{
g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE);
- return GIMP_CANVAS_ITEM_GET_CLASS (item)->hit (item, x, y);
+ if (item->private->visible)
+ return GIMP_CANVAS_ITEM_GET_CLASS (item)->hit (item, x, y);
+
+ return FALSE;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]