Fix automation control point dragging.

git-svn-id: svn://localhost/ardour2/branches/3.0@5278 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-06-26 12:20:11 +00:00
parent fdceb08a93
commit 7b66abc7aa
2 changed files with 13 additions and 3 deletions

View File

@ -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),

View File

@ -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: