From f888d3d8ee8a08c144c67c8526fae7364e5ea1c1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 16 Apr 2022 18:02:25 -0600 Subject: [PATCH] specify valid chars for MIDI note names in preferences --- gtk2_ardour/rc_option_editor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 0ac64bff41..68a3bcebd7 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -3428,13 +3428,17 @@ These settings will only take effect after %1 is restarted.\n\ add_option (_("MIDI"), new OptionEditorHeading (_("Default Visible Note Range"))); + const std::string legal_midi_name_chars = S_("legal characters for MIDI note names|ABCDEFG#1234567890"); + mrl_option = new EntryOption ("lower-midi-note", _("Default lower visible MIDI note"), sigc::mem_fun (*this, &RCOptionEditor::get_default_lower_midi_note), sigc::mem_fun (*this, &RCOptionEditor::set_default_lower_midi_note)); + mrl_option->set_valid_chars (legal_midi_name_chars); mru_option = new EntryOption ("lower-midi-note", _("Default upper visible MIDI note"), sigc::mem_fun (*this, &RCOptionEditor::get_default_upper_midi_note), sigc::mem_fun (*this, &RCOptionEditor::set_default_upper_midi_note)); + mru_option->set_valid_chars (legal_midi_name_chars); add_option (_("MIDI"), mrl_option); add_option (_("MIDI"), mru_option);