From feb689d22029190b18459150e525f548f0205d67 Mon Sep 17 00:00:00 2001 From: Len Ovens Date: Tue, 5 May 2020 11:42:45 -0700 Subject: [PATCH] Fix issue 8087 menu build when only one bus If there is only one Foldback bus: the selection button still respond to left click. Any other click on the same button will need two clicks --- gtk2_ardour/foldback_strip.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/foldback_strip.cc b/gtk2_ardour/foldback_strip.cc index 126643676d..adc0439d8d 100644 --- a/gtk2_ardour/foldback_strip.cc +++ b/gtk2_ardour/foldback_strip.cc @@ -1198,10 +1198,15 @@ gboolean FoldbackStrip::name_button_button_press (GdkEventButton* ev) { if (ev->button == 1) { - Menu* menu = build_route_select_menu (); + StripableList slist; + boost::shared_ptr previous = boost::shared_ptr (); + _session->get_stripables (slist, PresentationInfo::FoldbackBus); + if (slist.size () > 1) { + Menu* menu = build_route_select_menu (); - Gtkmm2ext::anchored_menu_popup(menu, &name_button, "", + Gtkmm2ext::anchored_menu_popup(menu, &name_button, "", 1, ev->time); + } return true; } else if (ev->button == 3) { Menu* r_menu = build_route_ops_menu ();