Don't de-select tracks when order changes
authorRobin Gareus <robin@gareus.org>
Sat, 17 Jun 2017 13:49:01 +0000 (15:49 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 17 Jun 2017 14:14:28 +0000 (16:14 +0200)
gtk2_ardour/editor_selection.cc

index 087fcf74e0b5ffaf9391cb4800ef4803e5f82dfd..2eb0279f46ab4fd02ccc99ff23d1cf93c780df43 100644 (file)
@@ -1005,9 +1005,11 @@ Editor::presentation_info_changed (PropertyChange const & what_changed)
         * here, as a single handler.
         */
 
-       for (TrackViewList::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
-               (*i)->set_selected (false);
-               (*i)->hide_selection ();
+       if (what_changed.contains (Properties::selected)) {
+               for (TrackViewList::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
+                       (*i)->set_selected (false);
+                       (*i)->hide_selection ();
+               }
        }
 
        /* STEP 1: set the GUI selection state (in which TimeAxisViews for the
@@ -1048,6 +1050,7 @@ Editor::presentation_info_changed (PropertyChange const & what_changed)
                        TimeAxisView* tav = dynamic_cast<TimeAxisView*> (av);
 
                        if (!tav) {
+                               assert (0);
                                continue; /* impossible */
                        }