summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-09 14:11:24 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-09 14:11:24 +0000
commitf15862a4fb5f9128f900ef86e2b07c39fe4af7a2 (patch)
tree827d8ce82e33c0f80439de7ee4af103273520c6d /gtk2_ardour
parent700726a04001a40ce316e1c7c4b1abc21c167c71 (diff)
Reset entered_track if it is set to an automation child whose parent is deleted. Fixes #3389.
git-svn-id: svn://localhost/ardour2/branches/3.0@7569 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index f5d64a523d..28d9ee543a 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -5018,14 +5018,24 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
}
ENSURE_GUI_THREAD (*this, &Editor::timeaxisview_deleted, tv);
-
+ RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (tv);
+
_routes->route_removed (tv);
if (tv == entered_track) {
entered_track = 0;
}
-
+
+ if (rtav) {
+ TimeAxisView::Children c = rtav->get_child_list ();
+ for (TimeAxisView::Children::const_iterator i = c.begin(); i != c.end(); ++i) {
+ if (entered_track == i->get()) {
+ entered_track = 0;
+ }
+ }
+ }
+
/* remove it from the list of track views */
TrackViewList::iterator i;
@@ -5037,7 +5047,6 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
/* update whatever the current mixer strip is displaying, if revelant */
boost::shared_ptr<Route> route;
- RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (tv);
if (rtav) {
route = rtav->route ();