diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-02-08 12:50:32 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-02-08 12:50:32 +0000 |
commit | 53cb1b6572f1690d3eaf688880d85e743b42d4cd (patch) | |
tree | b231a4fdb27659a3060c97292c4e92708433cc90 /gtk2_ardour/editor_mouse.cc | |
parent | e061fa300980db4ba0f6a5978bb2df103ee6e455 (diff) |
mouse draw mode can draw AND select (and trim) notes (but trim cursors don't appear yet)
git-svn-id: svn://localhost/ardour2/branches/3.0@11470 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index df93f7ae16..f52f05274a 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -825,9 +825,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT ArdourCanvas::CanvasNote* cn = dynamic_cast<ArdourCanvas::CanvasNote*> (item); if (cn && cn->big_enough_to_trim() && cn->mouse_near_ends()) { _drags->set (new NoteResizeDrag (this, item), event, current_canvas_cursor); - } else { - _drags->set (new NoteDrag (this, item), event); - } + } } return true; @@ -868,6 +866,25 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT return true; break; + case MouseDraw: + switch (item_type) { + case NoteItem: + if (internal_editing()) { + /* trim notes if we're in internal edit mode and near the ends of the note */ + ArdourCanvas::CanvasNote* cn = dynamic_cast<ArdourCanvas::CanvasNote*> (item); + if (cn && cn->big_enough_to_trim() && cn->mouse_near_ends()) { + _drags->set (new NoteResizeDrag (this, item), event, current_canvas_cursor); + } else { + _drags->set (new NoteDrag (this, item), event); + } + return true; + } + break; + + default: + break; + } + case MouseObject: switch (item_type) { case NoteItem: |