selecting regions on multiple tracks which share playlists and
dragging them has various odd side-effects. This prevents the worst
of such edge-cases.
A cleaner solution would be to not allow selecting the same region
on multiple tracks at the same time in the first place.
Comments are welcome.
typedef map<boost::shared_ptr<Playlist>, RouteTimeAxisView*> PlaylistMapping;
PlaylistMapping playlist_mapping;
+ std::set<boost::shared_ptr<const Region> > uniq;
for (list<DraggingView>::const_iterator i = _views.begin(); i != _views.end(); ) {
RegionView* rv = i->view;
continue;
}
+ if (uniq.find (rv->region()) != uniq.end()) {
+ /* prevent duplicate moves when selecting regions from shared playlists */
+ ++i;
+ continue;
+ }
+ uniq.insert(rv->region());
+
if (i->time_axis_view < 0 || i->time_axis_view >= (int)_time_axis_views.size()) {
/* dragged to drop zone */