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:
Paul Davis 2010-09-15 16:54:17 +00:00
parent 5f948f6961
commit 7eea9fac9d
3 changed files with 19 additions and 13 deletions

View file

@ -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);
}
}