spill chained VCAs
authorRobin Gareus <robin@gareus.org>
Thu, 22 Dec 2016 00:05:53 +0000 (01:05 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 22 Dec 2016 00:05:53 +0000 (01:05 +0100)
gtk2_ardour/mixer_ui.cc

index 340a5a55ec96ea28f920afc3cfd1ff93a5e32456..857af7fc142c93a7106a6af1d86d355100a7f087 100644 (file)
@@ -1279,8 +1279,18 @@ void
 Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
 {
        TreeModel::Children rows = track_model->children();
+       std::list<boost::shared_ptr<VCA> > vcas;
+       vcas.push_back (vca);
 
-       for (TreeModel::Children::iterator i = rows.begin(); i != rows.end(); ++i) {
+       for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
+               AxisView* av = (*i)[stripable_columns.strip];
+               VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
+               if (vms && vms->vca()->slaved_to (vca)) {
+                       vcas.push_back (vms->vca());
+               }
+       }
+
+       for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
 
                AxisView* av = (*i)[stripable_columns.strip];
                MixerStrip* strip = dynamic_cast<MixerStrip*> (av);
@@ -1299,7 +1309,15 @@ Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
                        continue;
                }
 
-               if (strip->route()->slaved_to (vca)) {
+               bool slaved = false;
+               for (std::list<boost::shared_ptr<VCA> >::const_iterator m = vcas.begin(); m != vcas.end(); ++m) {
+                       if (strip->route()->slaved_to (*m)) {
+                               slaved = true;
+                               break;
+                       }
+               }
+
+               if (slaved) {
 
                        if (strip->packed()) {
                                strip_packer.reorder_child (*strip, -1); /* put at end */