Support note name editing in midi list editor

This commit is contained in:
Nil Geisweiller 2017-01-22 00:38:54 +02:00 committed by Robin Gareus
parent 77a2632e34
commit 8242f4f636

View File

@ -612,6 +612,13 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
}
break;
case 3: // name
ival = ParameterDescriptor::midi_note_num (text);
if (ival < 128) {
idelta = ival - note->note();
prop = MidiModel::NoteDiffCommand::NoteNumber;
opname = _("change note number");
apply = true;
}
break;
case 4: // velocity
if (sscanf (text.c_str(), "%d", &ival) == 1 && ival != note->velocity()) {