diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index b5922aeab8..d28ae7c14e 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -437,6 +437,11 @@ ARDOUR_UI::action_script_changed (int i, const std::string& n) } else { action_script_call_btn[i].set_icon (0, 0); } + if (n.empty ()) { + action_script_call_btn[i].set_text (string_compose ("%1%2", std::hex, i+1)); + } else { + action_script_call_btn[i].set_text (n.substr(0,1)); + } } std::string const a = string_compose (X_("script-%1"), i + 1); @@ -446,12 +451,10 @@ ARDOUR_UI::action_script_changed (int i, const std::string& n) act->set_label (string_compose (_("Unset #%1"), i + 1)); act->set_tooltip (_("No action bound\nRight-click to assign")); act->set_sensitive (false); - action_script_call_btn[i].set_text (string_compose ("%1%2", std::hex, i+1)); } else { act->set_label (n); act->set_tooltip (string_compose (_("%1\n\nClick to run\nRight-click to re-assign\nShift+right-click to unassign"), n)); act->set_sensitive (true); - action_script_call_btn[i].set_text (n.substr(0,1)); } KeyEditor::UpdateBindings (); }