fix assumption that during dragging, a DraggingView's time_axis_view field is always a positive integer within range
This commit is contained in:
parent
5bfc507cb3
commit
0aef128207
|
@ -1465,7 +1465,17 @@ RegionMoveDrag::finished (GdkEvent* ev, bool movement_occurred)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool const changed_position = (_last_position.sample != _primary->region()->position());
|
bool const changed_position = (_last_position.sample != _primary->region()->position());
|
||||||
bool const changed_tracks = (_time_axis_views[_views.front().time_axis_view] != &_views.front().view->get_time_axis_view());
|
bool changed_tracks;
|
||||||
|
|
||||||
|
if (_views.front().time_axis_view < 0) {
|
||||||
|
if (&_views.front().view->get_time_axis_view()) {
|
||||||
|
changed_tracks = true;
|
||||||
|
} else {
|
||||||
|
changed_tracks = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
changed_tracks = (_time_axis_views[_views.front().time_axis_view] != &_views.front().view->get_time_axis_view());
|
||||||
|
}
|
||||||
|
|
||||||
if (_copy) {
|
if (_copy) {
|
||||||
|
|
||||||
|
@ -6602,10 +6612,12 @@ DraggingView::DraggingView (RegionView* v, RegionDrag* parent, TimeAxisView* ita
|
||||||
: view (v)
|
: view (v)
|
||||||
, initial_time_axis_view (itav)
|
, initial_time_axis_view (itav)
|
||||||
{
|
{
|
||||||
/* note that time_axis_view may be null if the regionview was created
|
TimeAxisView* tav = &v->get_time_axis_view();
|
||||||
* as part of a copy operation.
|
if (tav) {
|
||||||
*/
|
time_axis_view = parent->find_time_axis_view (&v->get_time_axis_view ());
|
||||||
time_axis_view = parent->find_time_axis_view (&v->get_time_axis_view ());
|
} else {
|
||||||
|
time_axis_view = -1;
|
||||||
|
}
|
||||||
layer = v->region()->layer ();
|
layer = v->region()->layer ();
|
||||||
initial_y = v->get_canvas_group()->position().y;
|
initial_y = v->get_canvas_group()->position().y;
|
||||||
initial_playlist = v->region()->playlist ();
|
initial_playlist = v->region()->playlist ();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user