summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-04-07 00:17:54 +0000
committerCarl Hetherington <carl@carlh.net>2010-04-07 00:17:54 +0000
commit8e22163b6f7d94b67901d4ebcf99dda28807771f (patch)
tree525d63a0dfcc7ef229a43a9b565571916645c94e /gtk2_ardour/editor_drag.h
parent2e2b35d953812c4c0aab27cb71695f47d761d67b (diff)
Keep track of where a RegionView used to be before it was reparented for a drag. Fixes wayward drag-moves in stacked region mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@6867 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r--gtk2_ardour/editor_drag.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index fb66a2c746..d0bd00f5e6 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -210,6 +210,13 @@ private:
nframes64_t _last_pointer_frame; ///< adjusted_frame the last time a motion occurred
};
+struct DraggingView
+{
+ DraggingView (RegionView* v);
+
+ RegionView* view; ///< the view
+ double initial_y; ///< the initial y position of the view before any reparenting
+};
/** Abstract base class for drags that involve region(s) */
class RegionDrag : public Drag, public sigc::trackable
@@ -221,7 +228,7 @@ public:
protected:
RegionView* _primary; ///< the view that was clicked on (or whatever) to start the drag
- std::list<RegionView*> _views; ///< all views that are being dragged
+ std::list<DraggingView> _views; ///< information about all views that are being dragged
private:
void region_going_away (RegionView *);