Fix crash in Editor::sync_order_keys() when a route is removed.
git-svn-id: svn://localhost/ardour2/trunk@2597 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
95c0c53ab9
commit
6c923d7f60
@ -118,7 +118,7 @@ Editor::handle_new_route (Session::RouteList& routes)
|
||||
}
|
||||
|
||||
ignore_route_list_reorder = false;
|
||||
|
||||
|
||||
tv->set_old_order_key (route_display_model->children().size() - 1);
|
||||
route->gui_changed.connect (mem_fun(*this, &Editor::handle_gui_changes));
|
||||
|
||||
@ -162,7 +162,7 @@ Editor::remove_route (TimeAxisView *tv)
|
||||
TrackViewList::iterator i = find (track_views.begin(), track_views.end(), tv);
|
||||
|
||||
/* set up `nearby' to be a suitable nearby track to select once
|
||||
this one has gong */
|
||||
this one has gone */
|
||||
TrackViewList::iterator nearby = track_views.end ();
|
||||
if (i != track_views.end()) {
|
||||
|
||||
@ -191,6 +191,14 @@ Editor::remove_route (TimeAxisView *tv)
|
||||
}
|
||||
}
|
||||
|
||||
/* Decrement old order keys for tracks `above' the one that is being removed */
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
TimeAxisView* v = (*ri)[route_display_columns.tv];
|
||||
if (v->old_order_key() > tv->old_order_key()) {
|
||||
v->set_old_order_key (v->old_order_key() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
if ((*ri)[route_display_columns.tv] == tv) {
|
||||
route_display_model->erase (ri);
|
||||
|
Loading…
Reference in New Issue
Block a user