summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-05-18 17:36:06 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:43 -0400
commit69d2758e8c617b2d6da0e9b2729a7b46652496b1 (patch)
treeb7f2a532cd7beebf1b25907d1863af4e9761135f /gtk2_ardour/mixer_ui.cc
parent45b5c9667e8b2d50250cd6d2846f9e0905fb1e84 (diff)
actual implementation of VCA spill for mixer
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r--gtk2_ardour/mixer_ui.cc60
1 files changed, 57 insertions, 3 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 0c70668d51..39158f6779 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -1152,16 +1152,69 @@ Mixer_UI::track_list_delete (const Gtk::TreeModel::Path&)
}
void
-Mixer_UI::redisplay_track_list ()
+Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
{
TreeModel::Children rows = track_model->children();
- TreeModel::Children::iterator i;
- uint32_t n_masters = 0;
+ for (TreeModel::Children::iterator i = rows.begin(); i != rows.end(); ++i) {
+
+ MixerStrip* strip = (*i)[track_columns.strip];
+
+ if (!strip) {
+ /* we're in the middle of changing a row, don't worry */
+ continue;
+ }
+
+ if (!strip->route()) {
+ /* non-route element */
+ continue;
+ }
+
+ if (strip->route()->is_master() || strip->route()->is_monitor()) {
+ continue;
+ }
+
+ if (strip->route()->slaved_to (vca)) {
+
+ strip->set_gui_property ("visible", true);
+
+ if (strip->packed()) {
+ strip_packer.reorder_child (*strip, -1); /* put at end */
+ } else {
+ strip_packer.pack_start (*strip, false, false);
+ strip->set_packed (true);
+ }
+
+ } else {
+
+ strip->set_gui_property ("visible", false);
+
+ if (strip->packed()) {
+ strip_packer.remove (*strip);
+ strip->set_packed (false);
+ }
+ }
+ }
+}
+
+void
+Mixer_UI::redisplay_track_list ()
+{
if (no_track_list_redisplay) {
return;
}
+ boost::shared_ptr<VCA> sv = spilled_vca.lock ();
+
+ if (sv) {
+ spill_redisplay (sv);
+ return;
+ }
+
+ TreeModel::Children rows = track_model->children();
+ TreeModel::Children::iterator i;
+ uint32_t n_masters = 0;
+
container_clear (vca_packer);
for (i = rows.begin(); i != rows.end(); ++i) {
@@ -2671,6 +2724,7 @@ Mixer_UI::show_vca_slaves (boost::shared_ptr<VCA> vca)
if (v != vca) {
spilled_vca = vca;
show_vca_change (vca); /* EMIT SIGNAL */
+ redisplay_track_list ();
}
}