diff options
author | Carl Hetherington <carl@carlh.net> | 2012-03-22 16:41:23 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-03-22 16:41:23 +0000 |
commit | 3120bae8b41f3eecad25534ab6953e1b123ab9de (patch) | |
tree | 83542178768a7ca38427e2751a5a933102957537 /gtk2_ardour/editor_mouse.cc | |
parent | f9de5f6436486bd7fea3d7dfacc43c04af7dc85f (diff) |
Don't leave internal edit mode when clicking on an automation region view (#4747).
git-svn-id: svn://localhost/ardour2/branches/3.0@11749 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 0842403d73..5ee05336a4 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -456,9 +456,9 @@ Editor::mouse_mode_toggled (MouseMode m) instant_save (); if (!internal_editing()) { - if (mouse_mode != MouseRange && _join_object_range_state == JOIN_OBJECT_RANGE_NONE) { + if (mouse_mode != MouseRange && mouse_mode != MouseGain && _join_object_range_state == JOIN_OBJECT_RANGE_NONE) { - /* in all modes except range and joined object/range, hide the range selection, + /* in all modes except range, gain and joined object/range, hide the range selection, show the object (region) selection. */ @@ -824,7 +824,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (tvp.first); if (smart_mode_action->get_active() && atv) { /* smart "join" mode: drag automation */ - _drags->set (new AutomationRangeDrag (this, atv->base_item(), selection->time), event, _cursors->up_down); + _drags->set (new AutomationRangeDrag (this, atv, selection->time), event, _cursors->up_down); } else { /* this was debated, but decided the more common action was to make a new selection */ @@ -1040,7 +1040,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT /* if we're over an automation track, start a drag of its data */ AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (tvp.first); if (atv) { - _drags->set (new AutomationRangeDrag (this, atv->base_item(), selection->time), event, _cursors->up_down); + _drags->set (new AutomationRangeDrag (this, atv, selection->time), event, _cursors->up_down); } /* if we're over a track and a region, and in the `object' part of a region, @@ -1119,6 +1119,17 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT return true; break; + case SelectionItem: + { + AudioRegionView* arv = dynamic_cast<AudioRegionView *> (clicked_regionview); + if (arv) { + _drags->set (new AutomationRangeDrag (this, arv, selection->time), event, _cursors->up_down); + _drags->start_grab (event); + } + return true; + break; + } + case AutomationLineItem: _drags->set (new LineDrag (this, item), event); break; @@ -1286,7 +1297,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp break; case RegionItem: - if (!dynamic_cast<MidiRegionView*> (clicked_regionview)) { + if (!dynamic_cast<MidiRegionView*> (clicked_regionview) && !dynamic_cast<AutomationRegionView*> (clicked_regionview)) { leave_internal_edit_mode = true; } break; |