Mercurial > hg > svapp
comparison framework/Document.cpp @ 686:610fa108fbcc by-id
Update for changes to PlayParameters
author | Chris Cannam |
---|---|
date | Thu, 04 Jul 2019 18:04:59 +0100 |
parents | 0736beb8b852 |
children | e0b0f3e163ca |
comparison
equal
deleted
inserted
replaced
685:7540733f5480 | 686:610fa108fbcc |
---|---|
552 SVDEBUG << "Document::setMainModel: auto-alignment is off" << endl; | 552 SVDEBUG << "Document::setMainModel: auto-alignment is off" << endl; |
553 } | 553 } |
554 | 554 |
555 emit mainModelChanged(m_mainModel); | 555 emit mainModelChanged(m_mainModel); |
556 | 556 |
557 // Remove the playable explicitly - the main model's dtor will do | |
558 // this, but just in case something is still hanging onto a | |
559 // shared_ptr to the old main model so it doesn't get deleted yet | |
560 PlayParameterRepository::getInstance()->removePlayable | |
561 (oldMainModel.untyped); | |
562 | |
557 ModelById::release(oldMainModel); | 563 ModelById::release(oldMainModel); |
558 } | 564 } |
559 | 565 |
560 void | 566 void |
561 Document::addAlreadyDerivedModel(const Transform &transform, | 567 Document::addAlreadyDerivedModel(const Transform &transform, |
1335 writePlaceholderMainModel(out, indent + " "); | 1341 writePlaceholderMainModel(out, indent + " "); |
1336 } else { | 1342 } else { |
1337 mainModel->toXml(out, indent + " ", "mainModel=\"true\""); | 1343 mainModel->toXml(out, indent + " ", "mainModel=\"true\""); |
1338 } | 1344 } |
1339 | 1345 |
1340 PlayParameters *playParameters = | 1346 auto playParameters = |
1341 PlayParameterRepository::getInstance()->getPlayParameters | 1347 PlayParameterRepository::getInstance()->getPlayParameters |
1342 (m_mainModel.untyped); | 1348 (m_mainModel.untyped); |
1343 if (playParameters) { | 1349 if (playParameters) { |
1344 playParameters->toXml | 1350 playParameters->toXml |
1345 (out, indent + " ", | 1351 (out, indent + " ", |
1482 if (haveDerivation) { | 1488 if (haveDerivation) { |
1483 writeBackwardCompatibleDerivation(out, indent + " ", | 1489 writeBackwardCompatibleDerivation(out, indent + " ", |
1484 modelId, rec.second); | 1490 modelId, rec.second); |
1485 } | 1491 } |
1486 | 1492 |
1487 //!!! We should probably own the PlayParameterRepository | 1493 auto playParameters = |
1488 PlayParameters *playParameters = | |
1489 PlayParameterRepository::getInstance()->getPlayParameters | 1494 PlayParameterRepository::getInstance()->getPlayParameters |
1490 (modelId.untyped); | 1495 (modelId.untyped); |
1491 if (playParameters) { | 1496 if (playParameters) { |
1492 playParameters->toXml | 1497 playParameters->toXml |
1493 (out, indent + " ", | 1498 (out, indent + " ", |