X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fautomation_region_view.cc;h=e3e41b442801028c6eb47aefc01709749e747c52;hb=d4f91010c37a3ce185bb3c8bcf6453503eccd2b2;hp=963fe63c01caf99dee30a4b10cc4066c3f3975b3;hpb=cf52d6e4b40111eb04b244ec054055a4ec15dbe0;p=ardour.git diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index 963fe63c01..e3e41b4428 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -52,6 +52,8 @@ AutomationRegionView::AutomationRegionView (ArdourCanvas::Container* , _source_relative_time_converter(region->session().tempo_map(), region->position() - region->start()) , _parameter(param) { + TimeAxisViewItem::set_position (_region->position(), this); + if (list) { assert(list->parameter() == param); create_line(list); @@ -66,6 +68,7 @@ AutomationRegionView::AutomationRegionView (ArdourCanvas::Container* AutomationRegionView::~AutomationRegionView () { + in_destructor = true; RegionViewGoingAway (this); /* EMIT_SIGNAL */ } @@ -180,7 +183,7 @@ AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double /* snap frame */ - when = snap_frame_to_frame (when - _region->start ()) + _region->start (); + when = snap_frame_to_frame (when - _region->start ()).frame + _region->start (); /* map using line */