Make TimeAxisView::remove_child virtual so that RouteTimeAxis can override it to...
authorCarl Hetherington <carl@carlh.net>
Mon, 12 Dec 2011 02:17:17 +0000 (02:17 +0000)
committerCarl Hetherington <carl@carlh.net>
Mon, 12 Dec 2011 02:17:17 +0000 (02:17 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10985 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_time_axis.h
gtk2_ardour/time_axis_view.h

index a19ec1339f98557878ff30e88a67ee91944163ec..4feafd5667312b3096cf78e76e1c3cc9ef250ab8 100644 (file)
@@ -2484,3 +2484,19 @@ RouteTimeAxisView::state_id() const
        return string_compose ("rtav %1", _route->id().to_s());
 }
 
+
+void
+RouteTimeAxisView::remove_child (boost::shared_ptr<TimeAxisView> c)
+{
+       TimeAxisView::remove_child (c);
+       
+       boost::shared_ptr<AutomationTimeAxisView> a = boost::dynamic_pointer_cast<AutomationTimeAxisView> (c);
+       if (a) {
+               for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
+                       if (i->second == a) {
+                               _automation_tracks.erase (i);
+                               return;
+                       }
+               }
+       }
+}
index da64b23498cc91294fa1be22be3cfccf6b605292..eb1a212d0e0ec0a05b0b72759e863cc76e69423a 100644 (file)
@@ -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<TimeAxisView>);
 };
 
 #endif /* __ardour_route_time_axis_h__ */
index 790274c6265627fbac93b267654409d16556b8a7..9771c8b200d5d6be0689c9dac99de6b40fbec50c 100644 (file)
@@ -267,7 +267,7 @@ class TimeAxisView : public virtual AxisView
        Children children;
        bool is_child (TimeAxisView*);
 
-       void remove_child (boost::shared_ptr<TimeAxisView>);
+       virtual void remove_child (boost::shared_ptr<TimeAxisView>);
        void add_child (boost::shared_ptr<TimeAxisView>);
 
        /* selection display */