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
This commit is contained in:
Carl Hetherington 2010-08-09 14:11:24 +00:00
parent 700726a040
commit f15862a4fb

View File

@ -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 ();