diff options
author | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2017-08-24 11:54:15 +0200 |
---|---|---|
committer | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2017-08-24 15:41:40 +0200 |
commit | dea8ee7f38c297511d2e12b1e7366b1ac923d1c5 (patch) | |
tree | 921446e12b23021d63b2779c2bccf45bd997319b /gtk2_ardour | |
parent | 9c793759c81c306f9cf1dcf8e0be40a4ef16f795 (diff) |
Make clicks on io menu bundles always connect
If a bundle was already connected, a click on the corresponding entry
disconnected it, essentially giving toggle semantics to the io menus.
This behavior has three problems:
— When clicking on a not yet connected bundle, the new bundle replaces
any already connected one. This is not consistent with a toggle mode.
— It is a less discoverable and less easy way to disconnect a bundle
than the already present "Disconnect" menu entry.
— Bundles that match the I/O channels only partially (recently added to cater
for e.g. MIDI+STEREO tracks connecting to Master) are never
considered "connected" because the channels are not connected 1:1.
Those will thus never toggle, making the behavior inconsistent.
Change the semantics to ensure a bundle is connected on click instead.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 0a457cc6dd..5096f0f7ef 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -1078,13 +1078,7 @@ MixerStrip::bundle_input_chosen (boost::shared_ptr<ARDOUR::Bundle> c) return; } - ARDOUR::BundleList current = _route->input()->bundles_connected (); - - if (std::find (current.begin(), current.end(), c) == current.end()) { - _route->input()->connect_ports_to_bundle (c, true, this); - } else { - _route->input()->disconnect_ports_from_bundle (c, this); - } + _route->input()->connect_ports_to_bundle (c, true, this); } void @@ -1094,13 +1088,7 @@ MixerStrip::bundle_output_chosen (boost::shared_ptr<ARDOUR::Bundle> c) return; } - ARDOUR::BundleList current = _route->output()->bundles_connected (); - - if (std::find (current.begin(), current.end(), c) == current.end()) { - _route->output()->connect_ports_to_bundle (c, true, true, this); - } else { - _route->output()->disconnect_ports_from_bundle (c, this); - } + route->output()->connect_ports_to_bundle (c, true, true, this); } void |