fix dropzone region ordering
This commit is contained in:
parent
07997a6d38
commit
7b1d21128b
@ -756,6 +756,12 @@ RegionMotionDrag::y_movement_allowed (int delta_track, double delta_layer, int s
|
||||
return true;
|
||||
}
|
||||
|
||||
struct DraggingViewSorter {
|
||||
bool operator() (const DraggingView& a, const DraggingView& b) {
|
||||
return a.time_axis_view < b.time_axis_view;
|
||||
}
|
||||
};
|
||||
|
||||
void
|
||||
RegionMotionDrag::motion (GdkEvent* event, bool first_move)
|
||||
{
|
||||
@ -940,6 +946,14 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
|
||||
}
|
||||
}
|
||||
|
||||
if (first_move) {
|
||||
/* sort views by time_axis.
|
||||
* This retains track order in the dropzone, regardless
|
||||
* of actual selection order
|
||||
*/
|
||||
_views.sort (DraggingViewSorter());
|
||||
}
|
||||
|
||||
for (list<DraggingView>::iterator i = _views.begin(); i != _views.end(); ++i) {
|
||||
|
||||
RegionView* rv = i->view;
|
||||
|
Loading…
Reference in New Issue
Block a user