Skip to content

Commit 72a29cf

Browse files
committed
fix compatibility of 1.2 drum score
1 parent bcc0170 commit 72a29cf

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

libmscore/part.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ void Part::read(const QDomElement& de)
114114
}
115115
if (_partName.isEmpty())
116116
_partName = instr(0)->trackName();
117+
118+
// for compatibility with old scores:
119+
if(score()->mscVersion() <= 114 && instr(0)->useDrumset()) {
120+
foreach(Staff* staff, _staves) {
121+
staff->setStaffType(score()->staffTypes().value(PERCUSSION_STAFF_TYPE));
122+
}
123+
}
117124
}
118125

119126
//---------------------------------------------------------

libmscore/staff.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,6 @@ void Staff::read(const QDomElement& de)
425425
else
426426
domError(e);
427427
}
428-
//
429-
// for compatibility with old scores:
430-
//
431-
/* if (!_clefList->empty()) {
432-
ClefType ct = clef(0);
433-
if (ct == CLEF_PERC2 || ct == CLEF_PERC)
434-
_staffType = staffTypes[PERCUSSION_STAFF_TYPE];
435-
}
436-
*/
437428
}
438429

439430
//---------------------------------------------------------

0 commit comments

Comments
 (0)