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
This commit is contained in:
parent
2691209050
commit
3c5a870289
@ -558,17 +558,10 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
|
|||||||
queue_draw_item_area (item, bounding_box.get ());
|
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) {
|
if (_new_current_item == item) {
|
||||||
_new_current_item = 0;
|
_new_current_item = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_current_item == item) {
|
|
||||||
_current_item = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_grabbed_item == item) {
|
if (_grabbed_item == item) {
|
||||||
_grabbed_item = 0;
|
_grabbed_item = 0;
|
||||||
}
|
}
|
||||||
@ -577,11 +570,10 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
|
|||||||
_focused_item = 0;
|
_focused_item = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* an item which ignores events can never be the current item
|
if (_current_item == item) {
|
||||||
so we do not need to repick the current item.
|
/* no need to send a leave event to this item, since it is going away
|
||||||
*/
|
*/
|
||||||
|
_current_item = 0;
|
||||||
if (!item->ignore_events()) {
|
|
||||||
pick_current_item (0); // no mouse state
|
pick_current_item (0); // no mouse state
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user