fix 5498 -- use note length from step-entry with midi keybd.
authorRobin Gareus <robin@gareus.org>
Mon, 20 May 2013 22:25:04 +0000 (00:25 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 20 May 2013 22:25:04 +0000 (00:25 +0200)
gtk2_ardour/step_editor.cc

index 30d424c9c60b6d40f72c46b2dab8c9b72a251c1b..a75f0f98e45bc403827c9ac5931f58fd252dcad3 100644 (file)
@@ -255,7 +255,9 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo
         assert (step_edit_region);
         assert (step_edit_region_view);
 
-        if (beat_duration == 0.0) {
+        if (beat_duration == 0.0 && step_editor) {
+                beat_duration = step_editor->note_length();
+        } else if (beat_duration == 0.0) {
                 bool success;
                 beat_duration = _editor.get_grid_type_as_beats (success, step_edit_insert_position);