diff options
author | Robin Gareus <robin@gareus.org> | 2017-10-20 02:54:06 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-10-20 02:54:28 +0200 |
commit | aea350c958e2ec8ff545123cee5ae9157ef66fe3 (patch) | |
tree | 375e018b6059ea42c9857f5e9bbec5a2a9ba1e03 /gtk2_ardour | |
parent | bb4243c7a4d966d6be50f259d4358574e4660d2d (diff) |
Don't offer possible recursive VCA assignments in the GUI
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/control_slave_ui.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gtk2_ardour/control_slave_ui.cc b/gtk2_ardour/control_slave_ui.cc index 14467a0118..0c8ad87d28 100644 --- a/gtk2_ardour/control_slave_ui.cc +++ b/gtk2_ardour/control_slave_ui.cc @@ -191,22 +191,17 @@ ControlSlaveUI::vca_button_release (GdkEventButton* ev, uint32_t n) for (VCAList::iterator v = vcas.begin(); v != vcas.end(); ++v) { - boost::shared_ptr<GainControl> gcs = stripable->gain_control(); - boost::shared_ptr<GainControl> gcm = (*v)->gain_control(); - - if (gcs == gcm) { - /* asked to slave to self. not ok */ - continue; - } - - if (gcm->slaved_to (gcs)) { - /* master is already slaved to slave */ + if (stripable->assigned_to (_session->vca_manager_ptr (), *v)) { + /* master(stripable) is directly or indirectly controlled by slave (v) */ continue; } items.push_back (CheckMenuElem ((*v)->name())); Gtk::CheckMenuItem* item = dynamic_cast<Gtk::CheckMenuItem*> (&items.back()); + boost::shared_ptr<GainControl> gcs = stripable->gain_control(); + boost::shared_ptr<GainControl> gcm = (*v)->gain_control(); + if (gcs->slaved_to (gcm)) { item->set_active (true); slaved = true; |