Skip to content

Commit

Permalink
fix #271260 Incorrect Clef position on appending percussion instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Nov 13, 2018
1 parent d2e4520 commit 58e7aaa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
17 changes: 10 additions & 7 deletions libmscore/stafftype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,19 +278,21 @@ void StaffType::read(XmlReader& e)
setLines(e.readInt());
else if (tag == "lineDistance")
setLineDistance(Spatium(e.readDouble()));
else if (tag == "yoffset")
_yoffset = Spatium(e.readDouble());
else if (tag == "mag")
_userMag = e.readDouble();
else if (tag == "small")
_small = e.readBool();
else if (tag == "stepOffset")
_stepOffset = e.readInt();
else if (tag == "clef")
setGenClef(e.readInt());
else if (tag == "slashStyle") {
bool val = e.readInt() != 0;
setSlashStyle(val);
setShowBackTied(!val); // for compatibility with 2.0.2 scores where this prop
} // was lacking and controlled by "slashStyle" instead
else if (tag == "yoffset")
_yoffset = Spatium(e.readDouble());
else if (tag == "mag")
_userMag = e.readDouble();
else if (tag == "small")
_small = e.readBool();
else if (tag == "barlines")
setShowBarlines(e.readInt());
else if (tag == "timesig")
Expand Down Expand Up @@ -1387,7 +1389,8 @@ void StaffType::initStaffTypes()
_presets = {
// group, xml-name, human-readable-name, lin stpOff dist clef bars stmless time key ledger
StaffType(StaffGroup::STANDARD, "stdNormal", QObject::tr("Standard"), 5, 0, 1, true, true, false, true, true, true),
StaffType(StaffGroup::PERCUSSION, "perc1Line", QObject::tr("Perc. 1 line"), 1, -4, 1, true, true, false, true, false, true),
// StaffType(StaffGroup::PERCUSSION, "perc1Line", QObject::tr("Perc. 1 line"), 1, -4, 1, true, true, false, true, false, true),
StaffType(StaffGroup::PERCUSSION, "perc1Line", QObject::tr("Perc. 1 line"), 1, 0, 1, true, true, false, true, false, true),
StaffType(StaffGroup::PERCUSSION, "perc3Line", QObject::tr("Perc. 3 lines"), 3, 0, 2, true, true, false, true, false, true),
StaffType(StaffGroup::PERCUSSION, "perc5Line", QObject::tr("Perc. 5 lines"), 5, 0, 1, true, true, false, true, false, true),
// group xml-name, human-readable-name lin stpOff dist clef bars stemless time duration font size off genDur fret font size off duration symbol repeat thru minim style onLin rests stmDn stmThr upsDn sTFing nums bkTied
Expand Down
1 change: 0 additions & 1 deletion mtest/importmidi/perc_no_grand_staff.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<StaffType group="percussion">
<name>perc1Line</name>
<lines>1</lines>
<stepOffset>-4</stepOffset>
<keysig>0</keysig>
</StaffType>
<defaultClef>PERC</defaultClef>
Expand Down
1 change: 0 additions & 1 deletion mtest/importmidi/perc_respect_beat.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<StaffType group="percussion">
<name>perc1Line</name>
<lines>1</lines>
<stepOffset>-4</stepOffset>
<keysig>0</keysig>
</StaffType>
<defaultClef>PERC</defaultClef>
Expand Down
1 change: 0 additions & 1 deletion mtest/importmidi/perc_triplet.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<StaffType group="percussion">
<name>perc1Line</name>
<lines>1</lines>
<stepOffset>-4</stepOffset>
<keysig>0</keysig>
</StaffType>
<defaultClef>PERC</defaultClef>
Expand Down

0 comments on commit 58e7aaa

Please sign in to comment.