Skip to content

Commit

Permalink
Merge pull request #21842 from miiizen/xml-line-position
Browse files Browse the repository at this point in the history
Set spanner position by checking totalY
  • Loading branch information
mike-spa committed Mar 11, 2024
2 parents 40357e1 + b92a7e8 commit 0eab01d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3064,8 +3064,12 @@ void MusicXMLParserDirection::direction(const String& partId,
} else {
String spannerPlacement = placement;
// Case-based defaults
if (spannerPlacement.empty() && desc.sp->isHairpin()) {
spannerPlacement = isVocalStaff ? u"above" : u"below";
if (spannerPlacement.empty()) {
if (desc.sp->isHairpin()) {
spannerPlacement = isVocalStaff ? u"above" : u"below";
} else {
spannerPlacement = totalY() < 0 ? u"above" : u"below";
}
}
if (spdesc.isStopped) {
m_pass2.addSpanner(desc);
Expand Down

0 comments on commit 0eab01d

Please sign in to comment.