Fix editor-mixer update when deleting a Route before a VCA
authorRobin Gareus <robin@gareus.org>
Fri, 13 Jan 2017 07:43:18 +0000 (08:43 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 13 Jan 2017 07:43:18 +0000 (08:43 +0100)
When deleting the last track before a VCA, on-delete the editor-mixer
switches to display the next TAV.  If that turns out to be a VCATAV,
the editor-mixer will ignore it and keep displaying the deleted route,
holding a shared pointer reference (ports won't be dropped, etc etc).

gtk2_ardour/editor.cc

index 17ed10e68d85eb87b5c2a60318f955326c2eeae7..d7e65a13cca868261d29b7a84e46d2280c2dcaaa 100644 (file)
@@ -5400,6 +5400,16 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
                        next_tv = (*i);
                }
 
+               // skip VCAs (cannot be selected, n/a in editor-mixer)
+               if (dynamic_cast<VCATimeAxisView*> (next_tv)) {
+                       /* VCAs are sorted last in line -- route_sorter.h, jump to top */
+                       next_tv = track_views.front();
+               }
+               if (dynamic_cast<VCATimeAxisView*> (next_tv)) {
+                       /* just in case: no master, only a VCA remains */
+                       next_tv = 0;
+               }
+
 
                if (next_tv) {
                        set_selected_mixer_strip (*next_tv);