tweaks to improve enter/leave event handling - fixes at least some crashes caused by this stuff
This commit is contained in:
parent
6f664c1f67
commit
737433c446
@ -147,7 +147,9 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisViewItem::init (const string& it_name, double fpp, Gdk::Color const & base_color, framepos_t start, framepos_t duration, Visibility vis, bool wide, bool high)
|
||||
TimeAxisViewItem::init (const string& it_name, double fpp, Gdk::Color const & base_color,
|
||||
framepos_t start, framepos_t duration, Visibility vis,
|
||||
bool wide, bool high)
|
||||
{
|
||||
item_name = it_name;
|
||||
samples_per_pixel = fpp;
|
||||
|
@ -377,6 +377,7 @@ GtkCanvas::enter_leave_items (Duple const & point)
|
||||
if (new_item->ignore_events()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_current_item && _current_item != new_item) {
|
||||
/* leave event */
|
||||
GdkEventCrossing leave_event;
|
||||
@ -395,10 +396,11 @@ GtkCanvas::enter_leave_items (Duple const & point)
|
||||
enter_event.y = point.y;
|
||||
cerr << "Entering (" << new_item->name << ") " << new_item->whatami() << endl;
|
||||
new_item->Event (reinterpret_cast<GdkEvent*> (&enter_event));
|
||||
|
||||
_current_item = new_item;
|
||||
break;
|
||||
}
|
||||
|
||||
_current_item = new_item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,8 +175,8 @@ Group::add (Item* i)
|
||||
_items.push_back (i);
|
||||
invalidate_lut ();
|
||||
_bounding_box_dirty = true;
|
||||
|
||||
|
||||
DEBUG_TRACE (PBD::DEBUG::CanvasItemsDirtied, "canvas item dirty: group add\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -70,13 +70,13 @@ Item::init ()
|
||||
|
||||
Item::~Item ()
|
||||
{
|
||||
if (_canvas) {
|
||||
_canvas->item_going_away (this, _bounding_box);
|
||||
}
|
||||
|
||||
if (_parent) {
|
||||
_parent->remove (this);
|
||||
}
|
||||
|
||||
if (_canvas) {
|
||||
_canvas->item_going_away (this, _bounding_box);
|
||||
}
|
||||
}
|
||||
|
||||
ArdourCanvas::Rect
|
||||
|
Loading…
Reference in New Issue
Block a user