summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-03-25 17:05:19 +0100
committerRobin Gareus <robin@gareus.org>2019-03-25 17:05:19 +0100
commit60262275af54085fa290210a75ff6da7b5a04fbc (patch)
tree504ae059c041193bedbcd5e2921005bda4e2bcd7 /libs/ardour/route.cc
parent3448f3151e52565197692512e92be7dc0c08a7c2 (diff)
Do not create automation when shifting (insert/remove time)
This fixes a bug when shift() creates automation for parameters that can not have any automation (hidden parameters, Mixbus PRE). The GUI (RTAV) aborts() when it finds an automation lane for a hidden parameter. This also cleans up shift() operations in general. Empty automation lanes should be left alone, no guard-point at zero should be added.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 00a966aa2c..ac66e4feda 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -4224,6 +4224,9 @@ Route::shift (samplepos_t pos, samplecnt_t samples)
boost::shared_ptr<AutomationControl> ac = (*i)->automation_control (*p);
if (ac) {
boost::shared_ptr<AutomationList> al = ac->alist();
+ if (al->empty ()) {
+ continue;
+ }
XMLNode &before = al->get_state ();
al->shift (pos, samples);
XMLNode &after = al->get_state ();