diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-06 22:07:10 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-06 22:07:10 +0000 |
commit | aefcce1c99598cc8c1748940a01e2d8aa55caf85 (patch) | |
tree | 9a6b0a3be7faac2c82b58f3517640fa195c96825 /gtk2_ardour/editor_drag.cc | |
parent | 77364b0e25bcf97d0f3000ee97c27b2dca8454c6 (diff) |
ogg/flac support bits and pieces; fix up MIDI note dragging and front-edge trims; BROKEN IN PERCUSSIVE MODE FOR NOW
git-svn-id: svn://localhost/ardour2/branches/3.0@5745 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 5e4a002e94..5aef521608 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -45,6 +45,7 @@ using namespace PBD; using namespace sigc; using namespace Gtk; using namespace Editing; +using namespace ArdourCanvas; double const ControlPointDrag::_zero_gain_fraction = gain_to_slider_position (dB_to_coefficient (0.0)); @@ -3366,7 +3367,7 @@ MouseZoomDrag::finished (GdkEvent* event, bool movement_occurred) NoteDrag::NoteDrag (Editor* e, ArdourCanvas::Item* i) : Drag (e, i) { - ArdourCanvas::CanvasNote* cnote = dynamic_cast<ArdourCanvas::CanvasNote*>(_item); + CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item); region = &cnote->region_view(); } @@ -3389,7 +3390,7 @@ NoteDrag::start_grab (GdkEvent* event, Gdk::Cursor *) last_x = region->snap_to_pixel(event_x); last_y = event_y; - ArdourCanvas::CanvasNote* cnote = dynamic_cast<ArdourCanvas::CanvasNote*>(_item); + CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item); if (!(was_selected = cnote->selected())) { @@ -3447,8 +3448,16 @@ NoteDrag::motion (GdkEvent*, bool) dy = streamview->note_height() * this_delta_note; last_y = last_y + dy; } - - region->move_selection (dx, dy); + + if (dx || dy) { + region->move_selection (dx, dy); + + CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item); + char buf[4]; + snprintf (buf, sizeof (buf), "%g", (int) cnote->note()->note() + drag_delta_note); + //editor.show_verbose_canvas_cursor_with (Evoral::midi_note_name (ev->note()->note())); + _editor->show_verbose_canvas_cursor_with (buf); + } } void |