13
0

initialize rec-enable controllable after setting MidiTrack's diskstream (see comment for why)

git-svn-id: svn://localhost/ardour2/branches/3.0@8118 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-11-28 19:28:21 +00:00
parent 9b7a35cdc0
commit 761488e547

View File

@ -156,6 +156,19 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base)
XMLNode *child;
nlist = node.children();
if (version >= 3000) {
if ((child = find_named_node (node, X_("Diskstream"))) != 0) {
boost::shared_ptr<MidiDiskstream> ds (new MidiDiskstream (_session, *child));
ds->do_refill_with_alloc ();
set_diskstream (ds);
}
}
/* set rec-enable control *AFTER* setting up diskstream, because it may want to operate
on the diskstream as it sets its own state
*/
for (niter = nlist.begin(); niter != nlist.end(); ++niter){
child = *niter;
@ -166,14 +179,6 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base)
}
}
if (version >= 3000) {
if ((child = find_named_node (node, X_("Diskstream"))) != 0) {
boost::shared_ptr<MidiDiskstream> ds (new MidiDiskstream (_session, *child));
ds->do_refill_with_alloc ();
set_diskstream (ds);
}
}
pending_state = const_cast<XMLNode*> (&node);
if (_session.state_of_the_state() & Session::Loading) {