summaryrefslogtreecommitdiff
path: root/gtk2_ardour/selection.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-03-28 21:45:44 +0200
committerRobin Gareus <robin@gareus.org>2016-03-28 21:45:44 +0200
commita5b06c5a41c24b8a2c3939f7245ab7a21f8c8daa (patch)
treee533506f21ae999a0ac1b5850817ba98badb5f39 /gtk2_ardour/selection.cc
parent2972fe0fc2b3aaf6c1b010a9376086d5b2ba7cd1 (diff)
fix gain automation copy/paste -- #6842
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r--gtk2_ardour/selection.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index aa12e4fea8..d5fadb9cbb 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -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