summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_region_view.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-05 16:54:29 -0500
committerDavid Robillard <d@drobilla.net>2014-12-05 17:36:02 -0500
commita65cd2a1b9d23ab368c310edf1ee75fb8295e718 (patch)
treea6db57629e470f84a2651123b72ea6d439adca3c /gtk2_ardour/automation_region_view.cc
parent9266e7524aba32e93a6385547ce8b7888ef34a8c (diff)
Make scroll work on MIDI regions when internal.
For some reason, grabbing the magic keyboard focus makes scroll stop working regardless of what MRV::canvas_group_event() returns. I can't figure out any reason to grab the keyboard in this case anyway, so I just removed it. Also simlify MRV event handling code in general.
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r--gtk2_ardour/automation_region_view.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index d44615d79a..871e83eec8 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -103,6 +103,11 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev)
return false;
}
+ if (!trackview.editor().internal_editing()) {
+ // not in internal edit mode, so just act like a normal region
+ return RegionView::canvas_group_event (ev);
+ }
+
PublicEditor& e = trackview.editor ();
if (ev->type == GDK_BUTTON_PRESS && e.current_mouse_mode() == Editing::MouseObject) {
@@ -121,7 +126,7 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev)
if (e.drags()->end_grab (ev)) {
return true;
} else if (e.current_mouse_mode() != Editing::MouseDraw) {
- return false;
+ return RegionView::canvas_group_event (ev);
}
double x = ev->button.x;
@@ -140,7 +145,7 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev)
return true;
}
- return false;
+ return RegionView::canvas_group_event (ev);
}
/** @param when Position in frames, where 0 is the start of the region.