diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-25 16:23:11 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-25 16:26:37 +0200 |
commit | 7751841b784856e66c7bf0d61d134cdf69cf3855 (patch) | |
tree | a99b5865ac73357851a3712c10b68f14b64861ea /gtk2_ardour/panner_ui.cc | |
parent | e16ac09e549febcbe443f7227d45071d14dbb159 (diff) |
Allow to un/link panner directly from the panner #8024
When editing a sends, this allows to unlink send panner via
the panner's context menu.
NB. After 6.0-rc string freeze the context menu needs an update.
So far the text from the Processor Box context menu is reused.
Diffstat (limited to 'gtk2_ardour/panner_ui.cc')
-rw-r--r-- | gtk2_ardour/panner_ui.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 2a6daa1701..7837008f71 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -414,6 +414,17 @@ PannerUI::build_pan_menu () items.push_back (MenuElem (_("Edit..."), sigc::mem_fun (*this, &PannerUI::pan_edit))); } + if (_send_mode) { + items.push_back (SeparatorElem()); + // XXX change string after string-freeze XXX -> "Link to route panner" + items.push_back (CheckMenuElem (_("Link panner controls"), sigc::mem_fun(*this, &PannerUI::pan_bypass_toggle))); + send_link_menu_item = static_cast<Gtk::CheckMenuItem*> (&items.back()); + send_link_menu_item->set_active (_panshell->is_linked_to_route ()); + send_link_menu_item->signal_toggled().connect (sigc::mem_fun(*this, &PannerUI::pan_link_toggle)); + } else { + send_link_menu_item = NULL; + } + if (_panner_list.size() > 1 && !_panshell->bypassed()) { RadioMenuItem::Group group; items.push_back (SeparatorElem()); @@ -438,6 +449,14 @@ PannerUI::pan_bypass_toggle () } void +PannerUI::pan_link_toggle () +{ + if (send_link_menu_item && (_panshell->is_linked_to_route() != send_link_menu_item->get_active())) { + _panshell->set_linked_to_route (!_panshell->is_linked_to_route()); + } +} + +void PannerUI::pan_edit () { if (_panshell->bypassed()) { |