@@ -4026,53 +4026,32 @@ void Chord::layoutArticulations2(bool layoutOnCrossBeamSide)
4026
4026
}
4027
4027
}
4028
4028
}
4029
- Articulation* stacc = nullptr ;
4029
+
4030
4030
for (Articulation* a : _articulations) {
4031
- double kearnHeight = 0.0 ;
4032
- if (a->isStaccato ()) {
4033
- stacc = a;
4034
- } else if (stacc && a->isAccent () && stacc->up () == a->up ()
4035
- && (RealIsEqualOrLess (stacc->ypos (), 0.0 ) || RealIsEqualOrMore (stacc->ypos (), staff ()->height ()))) {
4036
- kearnHeight = stacAccentKern;
4037
- } else {
4038
- stacc = nullptr ;
4039
- }
4040
- double x = (up () != a->up () || !a->isBasicArticulation ()) ? headSideX : stemSideX;
4041
4031
if (layoutOnCrossBeamSide && !a->isOnCrossBeamSide ()) {
4042
4032
continue ;
4043
4033
}
4044
4034
ArticulationAnchor aa = a->anchor ();
4045
- if (aa != ArticulationAnchor::TOP_CHORD && aa != ArticulationAnchor::BOTTOM_CHORD ) {
4035
+ if (!a-> layoutCloseToNote () || aa == ArticulationAnchor::TOP_STAFF || aa == ArticulationAnchor::BOTTOM_STAFF ) {
4046
4036
continue ;
4047
4037
}
4048
-
4038
+ double x = ( up () != a-> up () || !a-> isBasicArticulation ()) ? headSideX : stemSideX;
4049
4039
if (a->up ()) {
4050
- if (!a->layoutCloseToNote ()) {
4051
- a->layout ();
4052
- a->setPos (x, chordTopY + kearnHeight);
4053
- a->doAutoplace ();
4054
- }
4055
4040
if (a->visible ()) {
4056
4041
chordTopY = a->y () - a->height () - minDist;
4057
4042
}
4058
4043
} else {
4059
- if (!a->layoutCloseToNote ()) {
4060
- a->layout ();
4061
- a->setPos (x, chordBotY + abs (a->bbox ().top ()) - kearnHeight);
4062
- a->doAutoplace ();
4063
- }
4064
4044
if (a->visible ()) {
4065
4045
chordBotY = a->y () + a->height () + minDist;
4066
4046
}
4067
4047
}
4068
4048
}
4069
-
4070
4049
//
4071
- // now place all articulations with staff top or bottom anchor
4050
+ // now place all articulations with staff top or bottom anchor, or chord anchor for artics that don't layout close to note
4072
4051
//
4073
4052
staffTopY = std::min (staffTopY, chordTopY);
4074
4053
staffBotY = std::max (staffBotY, chordBotY);
4075
- stacc = nullptr ;
4054
+ Articulation* stacc = nullptr ;
4076
4055
for (Articulation* a : _articulations) {
4077
4056
double kearnHeight = 0.0 ;
4078
4057
if (layoutOnCrossBeamSide && !a->isOnCrossBeamSide ()) {
0 commit comments