summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-06-26 12:20:11 +0000
committerCarl Hetherington <carl@carlh.net>2009-06-26 12:20:11 +0000
commit7b66abc7aafb47179b7a683d6a0ec5b7c59645cb (patch)
treef6352275ec9acc7f71a4384404346039ee841754 /gtk2_ardour
parentfdceb08a9371f60d3ddda1abd64ba03d9d5a6f8b (diff)
Fix automation control point dragging.
git-svn-id: svn://localhost/ardour2/branches/3.0@5278 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_drag.cc12
-rw-r--r--gtk2_ardour/editor_drag.h4
2 files changed, 13 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index b1176d33e3..b9906eda5b 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -2532,6 +2532,18 @@ ControlPointDrag::finished (GdkEvent* event, bool movement_occurred)
_point->line().end_drag (_point);
}
+bool
+ControlPointDrag::active (Editing::MouseMode m)
+{
+ if (m == Editing::MouseGain) {
+ /* always active in mouse gain */
+ return true;
+ }
+
+ /* otherwise active if the point is on an automation line (ie not if its on a region gain line) */
+ return dynamic_cast<AutomationLine*> (&(_point->line())) != 0;
+}
+
LineDrag::LineDrag (Editor* e, ArdourCanvas::Item* i)
: Drag (e, i),
_line (0),
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index b01ba78709..97e503f0d6 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -404,9 +404,7 @@ public:
void motion (GdkEvent *, bool);
void finished (GdkEvent *, bool);
- bool active (Editing::MouseMode m) {
- return (m == Editing::MouseGain);
- }
+ bool active (Editing::MouseMode m);
private: