diff options
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 14 | ||||
-rw-r--r-- | gtk2_ardour/streamview.h | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index bb59a4ad24..2d6c98b373 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -964,6 +964,7 @@ RegionMoveDrag::finished_no_copy ( list<pair<boost::shared_ptr<Region>, double> > pending_explicit_relayers; Playlist::RegionList pending_implicit_relayers; + set<RouteTimeAxisView*> views_to_update; if (_brushing) { /* all changes were made during motion event handlers */ @@ -989,6 +990,8 @@ RegionMoveDrag::finished_no_copy ( continue; } + views_to_update.insert (dest_rtv); + framepos_t where; if (changed_position && !_x_constrained) { @@ -1134,6 +1137,17 @@ RegionMoveDrag::finished_no_copy ( add_stateful_diff_commands_for_playlists (modified_playlists); _editor->commit_reversible_command (); + + /* We have futzed with the layering of canvas items on our streamviews. + If any region changed layer, this will have resulted in the stream + views being asked to set up their region views, and all will be + well. If not, we might now have badly-ordered region views. Ask + the Streamviews involved to sort themselves out, just in case. + */ + + for (set<RouteTimeAxisView*>::iterator i = views_to_update.begin(); i != views_to_update.end(); ++i) { + (*i)->view()->playlist_layered ((*i)->track ()); + } } /** Remove a region from a playlist, clearing the diff history of the playlist first if necessary. diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h index 795fe0f687..349b380d9f 100644 --- a/gtk2_ardour/streamview.h +++ b/gtk2_ardour/streamview.h @@ -118,6 +118,8 @@ public: void check_record_layers (boost::shared_ptr<ARDOUR::Region>, ARDOUR::framepos_t); + virtual void playlist_layered (boost::weak_ptr<ARDOUR::Track>); + sigc::signal<void, RegionView*> RegionViewAdded; sigc::signal<void> RegionViewRemoved; @@ -141,7 +143,6 @@ protected: void layer_regions (); virtual void playlist_switched (boost::weak_ptr<ARDOUR::Track>); - virtual void playlist_layered (boost::weak_ptr<ARDOUR::Track>); virtual void color_handler () = 0; |