mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
cleaner version of previous commit
git-svn-id: svn://localhost/ardour2/branches/3.0@7783 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5f948f6961
commit
7eea9fac9d
3 changed files with 19 additions and 13 deletions
|
|
@ -3715,21 +3715,15 @@ NoteDrag::motion (GdkEvent *, bool)
|
|||
double const tdy = dy * _note_height - _cumulative_dy;
|
||||
|
||||
if (tdx || tdy) {
|
||||
_region->move_selection (tdx, tdy);
|
||||
_cumulative_dx += tdx;
|
||||
_cumulative_dy += tdy;
|
||||
|
||||
_region->move_selection (tdx, tdy, _cumulative_dy);
|
||||
|
||||
char buf[12];
|
||||
snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (_primary->note()->note() + dy).c_str(),
|
||||
(int) floor (_primary->note()->note() + dy));
|
||||
|
||||
if (dy) {
|
||||
boost::shared_ptr<Evoral::Note<Evoral::MusicalTime> >
|
||||
moved_note (new Evoral::Note<Evoral::MusicalTime> (*(_primary->note())));
|
||||
moved_note->set_note (moved_note->note() + dy);
|
||||
_region->play_midi_note (moved_note);
|
||||
}
|
||||
|
||||
_editor->show_verbose_canvas_cursor_with (buf);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue