Skip to content

Commit

Permalink
Fix #17796: Export correct system-distance (#19512)
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed Sep 30, 2023
1 parent 5791ea7 commit 0abd780
Show file tree
Hide file tree
Showing 4 changed files with 3,121 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/importexport/musicxml/internal/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6590,9 +6590,10 @@ void ExportMusicXml::print(const Measure* const m, const int partNr, const int f

if (mpc.systemStart && !mpc.pageStart) {
// see System::layout2() for the factor 2 * score()->spatium()
const Measure* prevSystemMeasure = mpc.prevMeasure->coveringMMRestOrThis();
const double sysDist = getTenthsFromDots(mmR1->pagePos().y()
- mpc.prevMeasure->pagePos().y()
- mpc.prevMeasure->layoutData()->bbox().height()
- prevSystemMeasure->pagePos().y()
- prevSystemMeasure->layoutData()->bbox().height()
+ 2 * score()->style().spatium()
);
_xml.tag("system-distance", QString("%1").arg(QString::number(sysDist, 'f', 2)));
Expand Down

0 comments on commit 0abd780

Please sign in to comment.