mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-26 23:18:20 +01:00
do not create a (throwaway) playlist during track creation
This commit is contained in:
parent
50604d83de
commit
fd3b8f79af
2 changed files with 9 additions and 3 deletions
|
|
@ -1850,9 +1850,9 @@ Session::XMLRouteFactory (const XMLNode& node, int version)
|
|||
boost::shared_ptr<Track> track;
|
||||
|
||||
if (type == DataType::AUDIO) {
|
||||
track.reset (new AudioTrack (*this, X_("toBeResetFroXML")));
|
||||
track.reset (new AudioTrack (*this, string())); // name will be reset from XML in ::set_state() below
|
||||
} else {
|
||||
track.reset (new MidiTrack (*this, X_("toBeResetFroXML")));
|
||||
track.reset (new MidiTrack (*this, string())); // name will be reset from XML in ::set_state() below
|
||||
}
|
||||
|
||||
if (track->init()) {
|
||||
|
|
|
|||
|
|
@ -103,7 +103,13 @@ Track::init ()
|
|||
|
||||
set_align_choice_from_io ();
|
||||
|
||||
use_new_playlist (data_type());
|
||||
if (!name().empty()) {
|
||||
/* an empty name means that we are being constructed via
|
||||
serialized state (XML). Don't create a playlist, because one
|
||||
will be created or discovered during ::set_state().
|
||||
*/
|
||||
use_new_playlist (data_type());
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> rp (boost::dynamic_pointer_cast<Route> (shared_from_this()));
|
||||
boost::shared_ptr<Track> rt = boost::dynamic_pointer_cast<Track> (rp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue