From 960efd79a3cb51a655aa42f807bac571ecbdebec Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 20 Oct 2009 20:43:23 +0000 Subject: [PATCH] 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 --- gtk2_ardour/editor_drag.cc | 20 +++----------------- gtk2_ardour/editor_drag.h | 7 +------ 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index c2e30b9aab..db51191b64 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -759,7 +759,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred) the drag. */ - if (Config->get_edit_mode() == Lock && !_copy) { + if (Config->get_edit_mode() == Lock) { _x_constrained = !_x_constrained; } @@ -977,24 +977,10 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred) bool -RegionMoveDrag::x_move_allowed () const -{ - if (Config->get_edit_mode() == Lock) { - if (_copy) { - return !_x_constrained; - } else { - /* in locked edit mode, reverse the usual meaning of _x_constrained */ - return _x_constrained; - } - } - - return !_x_constrained; -} - -bool -RegionInsertDrag::x_move_allowed () const +RegionMotionDrag::x_move_allowed () const { if (Config->get_edit_mode() == Lock) { + /* in locked edit mode, reverse the usual meaning of _x_constrained */ return _x_constrained; } diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index ae504dbef5..8475e9e315 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -194,7 +194,7 @@ protected: ); TimeAxisViewSummary get_time_axis_view_summary (); - virtual bool x_move_allowed () const = 0; + bool x_move_allowed () const; TimeAxisView* _dest_trackview; ARDOUR::layer_t _dest_layer; @@ -221,8 +221,6 @@ public: } private: - bool x_move_allowed () const; - bool _copy; }; @@ -233,9 +231,6 @@ public: RegionInsertDrag (Editor *, boost::shared_ptr, RouteTimeAxisView*, nframes64_t); void finished (GdkEvent *, bool); - -private: - bool x_move_allowed () const; }; /** Region drag in splice mode */