From b3461e937cc8b8a1bc1856661793441232f6cd24 Mon Sep 17 00:00:00 2001 From: Marc Sabatella Date: Tue, 18 Feb 2014 00:00:57 -0700 Subject: [PATCH] fix #24631: style not propagated to parts --- libmscore/mscore.cpp | 2 +- libmscore/score.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libmscore/mscore.cpp b/libmscore/mscore.cpp index 4b8faec8dd..59b0bae700 100644 --- a/libmscore/mscore.cpp +++ b/libmscore/mscore.cpp @@ -139,7 +139,7 @@ void MScore::init() _defaultStyle = new MStyle(); Ms::initStyle(_defaultStyle); - _defaultStyleForParts = new MStyle(*_defaultStyle); + _defaultStyleForParts = 0; _baseStyle = new MStyle(*_defaultStyle); // diff --git a/libmscore/score.cpp b/libmscore/score.cpp index 05746a242a..79d2bb61f6 100644 --- a/libmscore/score.cpp +++ b/libmscore/score.cpp @@ -378,7 +378,15 @@ Score::Score(Score* parent) _parentScore = parent; init(); - _style = MScore::defaultStyleForParts() ? *MScore::defaultStyleForParts() : *parent->style(); + _style = *parent->style(); + + QSettings s; + QString partStyle = s.value("partStyle").toString(); + if (!partStyle.isEmpty()) { + QFile f(partStyle); + if (f.open(QIODevice::ReadOnly)) + _style.load(&f); + } _synthesizerState = parent->_synthesizerState; }