From 5f6b2d6843f7c6663fa660332fa9cb4a3fb1631e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 12 Dec 2019 20:50:34 +0100 Subject: [PATCH] Allow to bind initial Lua action via left-click --- gtk2_ardour/ardour_ui_dependents.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index c1e58f43d6..213530e9f5 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -405,10 +405,11 @@ ARDOUR_UI::setup_windows () bool ARDOUR_UI::bind_lua_action_script (GdkEventButton*ev, int i) { - if (ev->button != 3) { + LuaInstance *li = LuaInstance::instance(); + std::string name; + if (ev->button != 3 && !(ev->button == 1 && !li->lua_action_name (i, name))) { return false; } - LuaInstance *li = LuaInstance::instance(); if (Gtkmm2ext::Keyboard::modifier_state_equals (ev->state, Gtkmm2ext::Keyboard::TertiaryModifier)) { li->remove_lua_action (i); } else {