summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-27 01:08:37 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-27 01:08:37 +0000
commit40d280d7b283543ee03c4d7b7fed617119488280 (patch)
tree0b8cf5f44daf98ec61559a239d94e9d4b1580f8c
parentd47161b9ee159eaae4552bc53673090540fed93b (diff)
Allow the region gain automation tool to create standard automation events. Fixes #3192.
git-svn-id: svn://localhost/ardour2/branches/3.0@7173 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor_mouse.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 217983a2ed..0d6cf7b79f 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -1295,23 +1295,20 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
break;
case MouseGain:
- // Gain only makes sense for audio regions
-
- if (!dynamic_cast<AudioRegionView*>(clicked_regionview)) {
- break;
- }
-
switch (item_type) {
case RegionItem:
+ {
/* check that we didn't drag before releasing, since
its really annoying to create new control
points when doing this.
*/
- if (were_dragging) {
- dynamic_cast<AudioRegionView*>(clicked_regionview)->add_gain_point_event (item, event);
+ AudioRegionView* arv = dynamic_cast<AudioRegionView*> (clicked_regionview);
+ if (were_dragging && arv) {
+ arv->add_gain_point_event (item, event);
}
return true;
break;
+ }
case AutomationTrackItem:
dynamic_cast<AutomationTimeAxisView*>(clicked_axisview)->