summaryrefslogtreecommitdiff
path: root/gtk2_ardour/canvas-note-event.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-12-23 21:05:50 +0000
committerDavid Robillard <d@drobilla.net>2008-12-23 21:05:50 +0000
commit2a2067388314ae1695f3be4d6ea9e3c3628f91ba (patch)
tree93b83d5f618e6161c7b8ede87f26565720789e44 /gtk2_ardour/canvas-note-event.cc
parent270f1abe8d2a3e3da369a8e64bc0e6806309304d (diff)
Fix note velocity editing.
Don't abuse/leak selection when editing velocity (fix editing velocity of a single note actually editing velocity of every note who's velocity had previously been edited). Properly preserve selection for MIDI operations in general. Less crap method of delineating scroll events to canvas items (no exhaustive type cases needed in editor_canvas_events.cc). Fix silly comment style in midi_region_view.h (hans: please note this and follow in the future). git-svn-id: svn://localhost/ardour2/branches/3.0@4343 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-note-event.cc')
-rw-r--r--gtk2_ardour/canvas-note-event.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/gtk2_ardour/canvas-note-event.cc b/gtk2_ardour/canvas-note-event.cc
index bb369c7998..e4bbe038c0 100644
--- a/gtk2_ardour/canvas-note-event.cc
+++ b/gtk2_ardour/canvas-note-event.cc
@@ -198,20 +198,10 @@ CanvasNoteEvent::on_event(GdkEvent* ev)
}
if (ev->scroll.direction == GDK_SCROLL_UP) {
- _region.note_selected(this, true);
- if (_region.mouse_state() == MidiRegionView::SelectTouchDragging) {
- // TODO: absolute velocity
- } else {
- _region.change_velocity(d_velocity, true);
- }
+ _region.change_velocity(this, d_velocity, true);
return true;
} else if (ev->scroll.direction == GDK_SCROLL_DOWN) {
- _region.note_selected(this, true);
- if (_region.mouse_state() == MidiRegionView::SelectTouchDragging) {
- // TODO: absolute velocity
- } else {
- _region.change_velocity(-d_velocity, true);
- }
+ _region.change_velocity(this, -d_velocity, true);
return true;
} else {
return false;