Skip to content

Commit

Permalink
fix import of default chordnames style in MuseScore 1.3 files
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Jun 26, 2013
1 parent 1b35202 commit 8e756eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libmscore/read114.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ static const StyleVal style114[] = {

StyleVal(ST_useGermanNoteNames, false),
StyleVal(ST_chordDescriptionFile, QString("stdchords.xml")),
StyleVal(ST_chordStyle, QString("custom")),
StyleVal(ST_chordsXmlFile, true),

StyleVal(ST_concertPitch, false),
StyleVal(ST_createMultiMeasureRests, false),
StyleVal(ST_minEmptyMeasures, 2),
Expand Down Expand Up @@ -620,8 +623,6 @@ Score::FileError Score::read114(XmlReader& e)
style()->set(ST_dontHideStavesInFirstSystem, false);
if (styleSt(ST_chordDescriptionFile) == "chords_std.xml")
style()->set(ST_chordDescriptionFile, QString("stdchords.xml"));
style()->set(StyleVal(ST_chordStyle, QString("custom")));
style()->set(StyleVal(ST_chordsXmlFile, true));

_showOmr = false;

Expand Down
4 changes: 4 additions & 0 deletions libmscore/style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,10 @@ void StyleData::load(XmlReader& e)
else
_customChordList = false;
_chordList.clear();
}

// make sure we have a chordlist

This comment has been minimized.

Copy link
@MarcSabatella

MarcSabatella Jun 28, 2013

Contributor

I take it this is part of the fix for the default chordList issue. I'd like to understand better what the overall strategy is. Seems this code will mean we always load a chord list immediately upon loading the score or a new style file. Does this mean the old strategy loading it on demand on the first call to score()->style()->chordList() is no more? I can't say I'll miss it, but I wanted to be sure I understand what's supposed to happen.

This comment has been minimized.

Copy link
@lasconic

lasconic Jun 28, 2013

Author Contributor

Yes. No more deferred loading 714bc53

This comment has been minimized.

Copy link
@MarcSabatella

MarcSabatella Jun 28, 2013

Contributor

Great. Anything else I should know about what's behind the changes? I guess it's mostly 2faaa67?

This comment has been minimized.

Copy link
@lasconic

lasconic Jun 28, 2013

Author Contributor

Yes. These two commits 714bc53 2faaa67 and the one we are commenting on 8e756eb

if(_chordList.isEmpty() && !chordListTag) {
if (value(ST_chordsXmlFile).toBool())
_chordList.read("chords.xml");
_chordList.read(newChordDescriptionFile);
Expand Down

0 comments on commit 8e756eb

Please sign in to comment.