X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fdiskstream.cc;h=ebd11a1887d1e9c71991908e0fa23ee23561ffb8;hb=d7a16786fc2bfa79d33dac676013fb34132d6fba;hp=c0ed359bdd44dd960d0a1e21d903f684b64505b6;hpb=22b07e0233a29d9633ffa825a79503befaf2e16e;p=ardour.git diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index c0ed359bdd..ebd11a1887 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -17,7 +17,6 @@ */ -#include #include #include #include @@ -47,7 +46,7 @@ #include "ardour/session.h" #include "ardour/track.h" -#include "i18n.h" +#include "pbd/i18n.h" #include using namespace std; @@ -381,7 +380,7 @@ Diskstream::use_playlist (boost::shared_ptr playlist) _playlist = playlist; _playlist->use(); - if (!in_set_state && recordable()) { + if (!in_set_state && destructive() && recordable()) { reset_write_sources (false); } @@ -462,7 +461,7 @@ Diskstream::get_state () { XMLNode* node = new XMLNode ("Diskstream"); char buf[64]; - LocaleGuard lg (X_("C")); + LocaleGuard lg; node->add_property ("flags", enum_2_string (_flags)); node->add_property ("playlist", _playlist->name()); @@ -484,7 +483,7 @@ Diskstream::get_state () int Diskstream::set_state (const XMLNode& node, int /*version*/) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("name")) != 0) { _name = prop->value(); @@ -569,7 +568,9 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove > const & continue; } boost::shared_ptr alist = ac->alist(); - + if (!alist->size()) { + continue; + } XMLNode & before = alist->get_state (); bool const things_moved = alist->move_ranges (movements); if (things_moved) { @@ -599,6 +600,9 @@ Diskstream::move_processor_automation (boost::weak_ptr p, list< Evora for (set::const_iterator i = a.begin (); i != a.end (); ++i) { boost::shared_ptr 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) { @@ -865,4 +869,3 @@ Diskstream::get_buffering_presets (BufferingPreset bp, return true; } -