extend strict-i/o to include route outputs.
[ardour.git] / gtk2_ardour / selection.cc
index f33bf61aad666b78aa43e62a30d4c34b9f19bd25..d5fadb9cbb4f57d09b40b953c67fc742de8e94a4 100644 (file)
@@ -620,10 +620,14 @@ Selection::add (boost::shared_ptr<Evoral::ControlList> cl)
                warning << "Programming error: Selected list is not an ARDOUR::AutomationList" << endmsg;
                return;
        }
-       if (find (lines.begin(), lines.end(), al) == lines.end()) {
-               lines.push_back (al);
-               LinesChanged();
-       }
+
+       /* The original may change so we must store a copy (not a pointer) here.
+        * e.g AutomationLine rewrites the list with gain mapping.
+        * the downside is that we can't perfom duplicate checks.
+        * This code was changed in response to #6842
+        */
+       lines.push_back (boost::shared_ptr<ARDOUR::AutomationList> (new ARDOUR::AutomationList(*al)));
+       LinesChanged();
 }
 
 void
@@ -790,7 +794,7 @@ void
 Selection::set (TimeAxisView* track)
 {
        clear_objects ();  //enforce object/range exclusivity
-       clear_tracks ();
+       clear_tracks (false);
        add (track);
 }
 
@@ -798,7 +802,7 @@ void
 Selection::set (const TrackViewList& track_list)
 {
        clear_objects();  //enforce object/range exclusivity
-       clear_tracks ();
+       clear_tracks (false);
        add (track_list);
 }