when showing a note value during a drag, clamp first to the actual range. note that the canvas object can still be dragged out of the region (above/below) but fixing this requires some kind of fancy auto-scroll that i'm not up for implementing at this time
git-svn-id: svn://localhost/ardour2/branches/3.0@9983 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
61eacc021a
commit
dd55f88d30
|
@ -3916,9 +3916,17 @@ NoteDrag::motion (GdkEvent *, bool)
|
|||
|
||||
_region->move_selection (tdx, tdy, note_delta);
|
||||
|
||||
/* the new note value may be the same as the old one, but we
|
||||
* don't know what that means because the selection may have
|
||||
* involved more than one note and we might be doing something
|
||||
* odd with them. so show the note value anyway, always.
|
||||
*/
|
||||
|
||||
char buf[12];
|
||||
snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (_primary->note()->note() + note_delta).c_str(),
|
||||
(int) floor (_primary->note()->note() + note_delta));
|
||||
uint8_t new_note = min (max (_primary->note()->note() + note_delta, 0), 127);
|
||||
|
||||
snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (new_note).c_str(),
|
||||
(int) floor (new_note));
|
||||
|
||||
show_verbose_cursor_text (buf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue