Fixes to pointer constraints when copying in lock edit mode; make them behave the same as when just dragging regions. Fixes some or all of mantis 2573.

git-svn-id: svn://localhost/ardour2/branches/3.0@5825 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-10-20 20:43:23 +00:00
parent 271f298635
commit 960efd79a3
2 changed files with 4 additions and 23 deletions

View file

@ -759,7 +759,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
the drag. the drag.
*/ */
if (Config->get_edit_mode() == Lock && !_copy) { if (Config->get_edit_mode() == Lock) {
_x_constrained = !_x_constrained; _x_constrained = !_x_constrained;
} }
@ -977,26 +977,12 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
bool bool
RegionMoveDrag::x_move_allowed () const RegionMotionDrag::x_move_allowed () const
{ {
if (Config->get_edit_mode() == Lock) { if (Config->get_edit_mode() == Lock) {
if (_copy) {
return !_x_constrained;
} else {
/* in locked edit mode, reverse the usual meaning of _x_constrained */ /* in locked edit mode, reverse the usual meaning of _x_constrained */
return _x_constrained; return _x_constrained;
} }
}
return !_x_constrained;
}
bool
RegionInsertDrag::x_move_allowed () const
{
if (Config->get_edit_mode() == Lock) {
return _x_constrained;
}
return !_x_constrained; return !_x_constrained;
} }

View file

@ -194,7 +194,7 @@ protected:
); );
TimeAxisViewSummary get_time_axis_view_summary (); TimeAxisViewSummary get_time_axis_view_summary ();
virtual bool x_move_allowed () const = 0; bool x_move_allowed () const;
TimeAxisView* _dest_trackview; TimeAxisView* _dest_trackview;
ARDOUR::layer_t _dest_layer; ARDOUR::layer_t _dest_layer;
@ -221,8 +221,6 @@ public:
} }
private: private:
bool x_move_allowed () const;
bool _copy; bool _copy;
}; };
@ -233,9 +231,6 @@ public:
RegionInsertDrag (Editor *, boost::shared_ptr<ARDOUR::Region>, RouteTimeAxisView*, nframes64_t); RegionInsertDrag (Editor *, boost::shared_ptr<ARDOUR::Region>, RouteTimeAxisView*, nframes64_t);
void finished (GdkEvent *, bool); void finished (GdkEvent *, bool);
private:
bool x_move_allowed () const;
}; };
/** Region drag in splice mode */ /** Region drag in splice mode */