When removing an item which is event-insensitive, there is no need to repick the...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 20 Jan 2014 15:53:58 +0000 (10:53 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 20 Jan 2014 15:53:58 +0000 (10:53 -0500)
This fixes crashes associated with ghost notes in midi regions.

libs/canvas/canvas.cc

index bb664afa95e7f3b7314b65d55d8f40ea7b2df408..2cf0a7ea1592860102666a493abe393077455879 100644 (file)
@@ -577,7 +577,13 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
                _focused_item = 0;
        }
 
-       pick_current_item (0); // no mouse state
+       /* 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()) {
+               pick_current_item (0); // no mouse state
+       }
        
 }