diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index a19ec1339f..4feafd5667 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -2484,3 +2484,19 @@ RouteTimeAxisView::state_id() const return string_compose ("rtav %1", _route->id().to_s()); } + +void +RouteTimeAxisView::remove_child (boost::shared_ptr c) +{ + TimeAxisView::remove_child (c); + + boost::shared_ptr a = boost::dynamic_pointer_cast (c); + if (a) { + for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) { + if (i->second == a) { + _automation_tracks.erase (i); + return; + } + } + } +} diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index da64b23498..eb1a212d0e 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -306,6 +306,10 @@ protected: UnderlayMirrorList _underlay_mirrors; bool _ignore_track_mode_change; ///< true to ignore track mode change signals + +private: + + void remove_child (boost::shared_ptr); }; #endif /* __ardour_route_time_axis_h__ */ diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 790274c626..9771c8b200 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -267,7 +267,7 @@ class TimeAxisView : public virtual AxisView Children children; bool is_child (TimeAxisView*); - void remove_child (boost::shared_ptr); + virtual void remove_child (boost::shared_ptr); void add_child (boost::shared_ptr); /* selection display */