Skip to content

Commit

Permalink
Revert "Fix #298147 MusicXML: Handle measure number offsets"
Browse files Browse the repository at this point in the history
See also musescore#7870, part 1, which is a backport of musescore#7617.
There are many mtests failures caused by that PR that need to get fixed first
  • Loading branch information
Jojo-Schmitz committed Mar 5, 2023
1 parent ecee642 commit ffc0ea3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion importexport/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6326,7 +6326,6 @@ void MeasureNumberStateHandler::updateForMeasure(const Measure* const m)
}

// update measure numbers and cache result
_measureNo += m->noOffset();
_cachedAttributes = " number=";
if ((_irregularMeasureNo + _measureNo) == 2 && m->irregular()) {
_cachedAttributes += "\"0\" implicit=\"yes\"";
Expand Down
6 changes: 2 additions & 4 deletions importexport/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2290,8 +2290,8 @@ void MusicXMLParserPass2::measure(const QString& partId,
const Fraction time)
{
Q_ASSERT(_e.isStartElement() && _e.name() == "measure");
int number = _e.attributes().value("number").toInt();
//qDebug("measure %d start", number);
//QString number = _e.attributes().value("number").toString();
//qDebug("measure %s start", qPrintable(number));

Measure* measure = findMeasure(_score, time);
if (!measure) {
Expand All @@ -2300,8 +2300,6 @@ void MusicXMLParserPass2::measure(const QString& partId,
return;
}

measure->setNoOffset(measure->no() - number);

// handle implicit measure
if (_e.attributes().value("implicit") == "yes")
measure->setIrregular(true);
Expand Down

0 comments on commit ffc0ea3

Please sign in to comment.