summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-06-08 21:53:45 +0000
committerCarl Hetherington <carl@carlh.net>2009-06-08 21:53:45 +0000
commitfb83e8ef14ba4be3871e6531a98b041cd1da79fd (patch)
tree51f3af379a12b62db35de3b01f4273ac439a32b7 /gtk2_ardour
parent0874426a5b6777559a12f87070b2aadb230ec50d (diff)
Fix dragging crash.
git-svn-id: svn://localhost/ardour2/branches/3.0@5128 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_drag.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index d41a91aadd..002fbdd32b 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -496,7 +496,9 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
multiple regions, much detail must be computed per-region */
/* current_pointer_view will become the TimeAxisView that we're currently pointing at, and
- current_pointer_layer the current layer on that TimeAxisView */
+ current_pointer_layer the current layer on that TimeAxisView; in this code layer numbers
+ are with respect to how the view's layers are displayed; if we are in Overlaid mode, layer
+ is always 0 regardless of what the region's "real" layer is */
RouteTimeAxisView* current_pointer_view;
layer_t current_pointer_layer;
if (!check_possible (&current_pointer_view, &current_pointer_layer)) {
@@ -1072,6 +1074,10 @@ RegionMotionDrag::check_possible (RouteTimeAxisView** tv, layer_t* layer)
(*tv) = dynamic_cast<RouteTimeAxisView*> (tvp.first);
(*layer) = tvp.second;
+ if (*tv && (*tv)->layer_display() == Overlaid) {
+ *layer = 0;
+ }
+
/* The region motion is only processed if the pointer is over
an audio track.
*/
@@ -1180,7 +1186,11 @@ RegionMoveDrag::RegionMoveDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p,
TimeAxisView* const tv = &_primary->get_time_axis_view ();
_dest_trackview = tv;
- _dest_layer = _primary->region()->layer ();
+ if (tv->layer_display() == Overlaid) {
+ _dest_layer = 0;
+ } else {
+ _dest_layer = _primary->region()->layer ();
+ }
double speed = 1;
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);