Improve performance of automation range moves.
authornick_m <mainsbridge@gmail.com>
Tue, 21 Jun 2016 12:04:06 +0000 (22:04 +1000)
committernick_m <mainsbridge@gmail.com>
Sat, 9 Jul 2016 16:18:37 +0000 (02:18 +1000)
libs/ardour/diskstream.cc

index 3ca463189c4ace26477a47d6ec3efd0ae5e50f4e..6eac0c1cd94d4c1631d7f4da32756315c1dafb93 100644 (file)
@@ -568,7 +568,9 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<framepos_t> > const &
                         continue;
                 }
                 boost::shared_ptr<AutomationList> alist = ac->alist();
-
+               if (!alist->size()) {
+                       continue;
+               }
                 XMLNode & before = alist->get_state ();
                 bool const things_moved = alist->move_ranges (movements);
                 if (things_moved) {
@@ -598,6 +600,9 @@ Diskstream::move_processor_automation (boost::weak_ptr<Processor> p, list< Evora
 
        for (set<Evoral::Parameter>::const_iterator i = a.begin (); i != a.end (); ++i) {
                boost::shared_ptr<AutomationList> al = processor->automation_control(*i)->alist();
+               if (!al->size()) {
+                       continue;
+               }
                XMLNode & before = al->get_state ();
                bool const things_moved = al->move_ranges (movements);
                if (things_moved) {