Re-show region views that we hid when dragging things on
authorCarl Hetherington <carl@carlh.net>
Sun, 13 Nov 2011 19:51:30 +0000 (19:51 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 13 Nov 2011 19:51:30 +0000 (19:51 +0000)
hidden tracks (fixes the rest of #3493).

git-svn-id: svn://localhost/ardour2/branches/3.0@10571 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_drag.cc

index de1b66891f29ef5fd9a8af3998139167dbb7ba34..bba3938d52cf7557bc20555d1707e8519cf9adec 100644 (file)
@@ -806,10 +806,18 @@ RegionMoveDrag::finished (GdkEvent *, bool movement_occurred)
 
        assert (!_views.empty ());
 
+       /* We might have hidden region views so that they weren't visible during the drag
+          (when they have been reparented).  Now everything can be shown again, as region
+          views are back in their track parent groups.
+       */
+       for (list<DraggingView>::iterator i = _views.begin(); i != _views.end(); ++i) {
+               i->view->get_canvas_group()->show ();
+       }
+       
        bool const changed_position = (_last_frame_position != _primary->region()->position());
        bool const changed_tracks = (_time_axis_views[_views.front().time_axis_view] != &_views.front().view->get_time_axis_view());
        framecnt_t const drag_delta = _primary->region()->position() - _last_frame_position;
-
+       
        _editor->update_canvas_now ();
 
        if (_copy) {