fix #288609: Crash when creating parts if a rest on a wrong staff after using cross-staff notation

This commit is contained in:
Matt McClinch 2019-05-06 08:30:54 -04:00
parent 1a6058f9a1
commit 5aa7cca1da

View file

@ -282,8 +282,11 @@ bool ChordRest::readProperties(XmlReader& e)
} }
else if (tag == "dots") else if (tag == "dots")
setDots(e.readInt()); setDots(e.readInt());
else if (tag == "staffMove") else if (tag == "staffMove") {
_staffMove = e.readInt(); _staffMove = e.readInt();
if (vStaffIdx() < part()->staves()->first()->idx() || vStaffIdx() > part()->staves()->last()->idx())
_staffMove = 0;
}
else if (tag == "Spanner") else if (tag == "Spanner")
Spanner::readSpanner(e, this, track()); Spanner::readSpanner(e, this, track());
else if (tag == "Lyrics") { else if (tag == "Lyrics") {