13
0

fix logic for setting state of tempo map from XML

We are using RCU for the tempo map so ... we need to use it
This commit is contained in:
Paul Davis 2020-12-19 18:30:49 -07:00
parent fa67e07d87
commit d1c695a1a6

View File

@ -1564,8 +1564,9 @@ Session::set_state (const XMLNode& node, int version)
goto out; goto out;
} else { } else {
try { try {
TempoMap::SharedPtr new_map (new TempoMap (*child, version)); TempoMap::SharedPtr tmap = TempoMap::write_copy (); /* get writable copy of current tempo map */
TempoMap::update (new_map); tmap->set_state (*child, version); /* reset its state */
TempoMap::update (tmap); /* update the global tempo map manager */
} catch (...) { } catch (...) {
goto out; goto out;
} }