fix #287701: Default synthesizer settings not applied to new or loaded score

This commit is contained in:
James Thistlewood 2019-04-14 11:03:11 +01:00
parent 935af55ec0
commit 62b4559a14
2 changed files with 8 additions and 1 deletions

View file

@ -4545,7 +4545,6 @@ void MasterScore::setLayout(const Fraction& t)
// the value of the expressive parameter.
//---------------------------------------------------------
void MasterScore::updateExpressive(MasterSynthesizer* m)
{
SynthesizerState s = synthesizerState();

View file

@ -760,6 +760,10 @@ MasterScore* MuseScore::getNewFile()
if (!copyright.isEmpty())
score->setMetaTag("copyright", copyright);
if (synti)
score->setSynthesizerState(synti->state());
// Call this even if synti doesn't exist - we need to rebuild either way
score->rebuildAndUpdateExpressive(synti);
{
@ -2247,6 +2251,10 @@ Score::FileError readScore(MasterScore* score, QString name, bool ignoreVersionE
score->setName(info.completeBaseName());
score->setImportedFilePath(name);
// Set the default synthesizer state before we read
if (synti)
score->setSynthesizerState(synti->state());
if (suffix == "mscz" || suffix == "mscx") {
Score::FileError rv = score->loadMsc(name, ignoreVersionError);
if (score && score->masterScore()->fileInfo()->path().startsWith(":/"))