summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-09-17 20:32:18 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-09-17 20:32:18 +0000
commit9a8cd09b19db14cef0349439ab6f5197fffb7f71 (patch)
tree90580a16ac5334705df4a8784aedf2db4329e954 /gtk2_ardour/editor_drag.cc
parentede4ecbb00ecc866c502454c81e711baea780ccd (diff)
fix errors in midi note drag preview (#3446)
git-svn-id: svn://localhost/ardour2/branches/3.0@7793 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 87d7b6a1a9..675a722509 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -3718,11 +3718,13 @@ NoteDrag::motion (GdkEvent *, bool)
_cumulative_dx += tdx;
_cumulative_dy += tdy;
- _region->move_selection (tdx, tdy, _cumulative_dy);
+ int8_t note_delta = total_dy();
+
+ _region->move_selection (tdx, tdy, note_delta);
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));
+ snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (_primary->note()->note() + note_delta).c_str(),
+ (int) floor (_primary->note()->note() + note_delta));
_editor->show_verbose_canvas_cursor_with (buf);
}