enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
[ardour.git] / libs / ardour / diskstream.cc
index 3b44c51dd46852da2ae93b24dafa3e526ce8bdab..ebd11a1887d1e9c71991908e0fa23ee23561ffb8 100644 (file)
@@ -46,7 +46,7 @@
 #include "ardour/session.h"
 #include "ardour/track.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 #include <locale.h>
 
 using namespace std;
@@ -380,7 +380,7 @@ Diskstream::use_playlist (boost::shared_ptr<Playlist> playlist)
                _playlist = playlist;
                _playlist->use();
 
-               if (!in_set_state && recordable()) {
+               if (!in_set_state && destructive() && recordable()) {
                        reset_write_sources (false);
                }
 
@@ -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) {