From 3c5a870289360869ba4d61216a6b332c8c6a64d4 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 20 Jan 2014 10:59:44 -0500 Subject: [PATCH] a better, more general fix for the previous Canvas::item_going_away() issue. There is no need to repick the current item if the item going away is NOT the current item --- libs/canvas/canvas.cc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc index 2cf0a7ea15..8a31d1fa9f 100644 --- a/libs/canvas/canvas.cc +++ b/libs/canvas/canvas.cc @@ -558,17 +558,10 @@ GtkCanvas::item_going_away (Item* item, boost::optional bounding_box) queue_draw_item_area (item, bounding_box.get ()); } - /* no need to send a leave event to this item, since it is going away - */ - if (_new_current_item == item) { _new_current_item = 0; } - if (_current_item == item) { - _current_item = 0; - } - if (_grabbed_item == item) { _grabbed_item = 0; } @@ -577,11 +570,10 @@ GtkCanvas::item_going_away (Item* item, boost::optional bounding_box) _focused_item = 0; } - /* an item which ignores events can never be the current item - so we do not need to repick the current item. - */ - - if (!item->ignore_events()) { + if (_current_item == item) { + /* no need to send a leave event to this item, since it is going away + */ + _current_item = 0; pick_current_item (0); // no mouse state }