From 60262275af54085fa290210a75ff6da7b5a04fbc Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 25 Mar 2019 17:05:19 +0100 Subject: [PATCH] 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. --- libs/ardour/route.cc | 3 +++ 1 file changed, 3 insertions(+) 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 ac = (*i)->automation_control (*p); if (ac) { boost::shared_ptr al = ac->alist(); + if (al->empty ()) { + continue; + } XMLNode &before = al->get_state (); al->shift (pos, samples); XMLNode &after = al->get_state ();