From ffc0ea37a32bd2074b7999043c8f5c00624a8746 Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Tue, 27 Jul 2021 17:34:09 +0200 Subject: [PATCH] Revert "Fix #298147 MusicXML: Handle measure number offsets" See also #7870, part 1, which is a backport of #7617. There are many mtests failures caused by that PR that need to get fixed first --- importexport/musicxml/exportxml.cpp | 1 - importexport/musicxml/importmxmlpass2.cpp | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/importexport/musicxml/exportxml.cpp b/importexport/musicxml/exportxml.cpp index b74023eb8aa7e..b8cd3d091428a 100644 --- a/importexport/musicxml/exportxml.cpp +++ b/importexport/musicxml/exportxml.cpp @@ -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\""; diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp index 144026539d828..7cb25bae6e323 100644 --- a/importexport/musicxml/importmxmlpass2.cpp +++ b/importexport/musicxml/importmxmlpass2.cpp @@ -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) { @@ -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);