mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 21:55:43 +01:00
Fix for crash on track removal, backported from trunk.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2687 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
513daee79d
commit
f8d6ceb200
2 changed files with 16 additions and 0 deletions
|
|
@ -115,6 +115,14 @@ Editor::remove_route (TimeAxisView *tv)
|
|||
TreeModel::Children rows = route_display_model->children();
|
||||
TreeModel::Children::iterator ri;
|
||||
|
||||
/* 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);
|
||||
|
|
|
|||
|
|
@ -327,6 +327,14 @@ Mixer_UI::remove_strip (MixerStrip* strip)
|
|||
strips.erase (i);
|
||||
}
|
||||
|
||||
/* Decrement old order keys for strips `above' the one that is being removed */
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
MixerStrip* s = (*ri)[track_columns.strip];
|
||||
if (s->old_order_key() > strip->old_order_key()) {
|
||||
s->set_old_order_key (s->old_order_key() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
if ((*ri)[track_columns.strip] == strip) {
|
||||
track_model->erase (ri);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue