From 6ae03aa212845614ec296daf413b104ad61d3dd4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 12 Jul 2011 11:02:12 +0000 Subject: Maintain order keys even when routes are hidden, to prevent git-svn-id: svn://localhost/ardour2/branches/3.0@9844 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_routes.cc | 5 ++++- gtk2_ardour/mixer_ui.cc | 15 +++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index f58ea47868..714c5faad9 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -474,10 +474,11 @@ EditorRoutes::redisplay () if (visible) { position += tv->show_at (position, n, &_editor->edit_controls_vbox); tv->clip_to_viewport (); - n++; } else { tv->hide (); } + + n++; } /* whenever we go idle, update the track view list to reflect the new order. @@ -782,6 +783,8 @@ EditorRoutes::sync_order_keys (string const & src) co.push_back (i->second); } + assert (co.size() == _model->children().size ()); + _model->reorder (co); _redisplay_does_not_reset_order_keys = false; } diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 0e6d21b7fc..cedf65ae80 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -747,15 +747,14 @@ Mixer_UI::redisplay_track_list () continue; } - bool visible = (*i)[track_columns.visible]; + if (!strip_redisplay_does_not_reset_order_keys) { + strip->route()->set_order_key (N_("signal"), order); + } + + bool const visible = (*i)[track_columns.visible]; if (visible) { strip->set_gui_property ("visible", true); - strip->route()->set_order_key (N_("signal"), order); - - if (!strip_redisplay_does_not_reset_order_keys) { - strip->route()->set_order_key (N_("signal"), order); - } if (strip->packed()) { @@ -773,7 +772,6 @@ Mixer_UI::redisplay_track_list () strip_packer.pack_start (*strip, false, false); } strip->set_packed (true); - //strip->show(); } } else { @@ -797,8 +795,9 @@ Mixer_UI::redisplay_track_list () // Resigc::bind all of the midi controls automatically - if (auto_rebinding) + if (auto_rebinding) { auto_rebind_midi_controls (); + } _group_tabs->set_dirty (); } -- cgit v1.2.3