fix for region-drag to the dropzone (#8672)

The DraggingView's time_axis_view (index) is set to the size of _time_axis_views
in ::motion() near line 1149. This makes it invalid as index into the vector.
This commit is contained in:
Paul Davis 2021-05-05 18:33:37 -06:00
parent 9e77d9dd50
commit 8cb09ab2cf

View File

@ -1467,14 +1467,20 @@ RegionMoveDrag::finished (GdkEvent* ev, bool movement_occurred)
bool const changed_position = (_last_position.sample != _primary->region()->position());
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;
}
if (_views.front().time_axis_view == _time_axis_views.size()) {
/* in the drop zone */
changed_tracks = true;
} else {
changed_tracks = (_time_axis_views[_views.front().time_axis_view] != &_views.front().view->get_time_axis_view());
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) {