fix #276164 Elements ignored by autoplace algorithm
Collisions with fingering numbers are not detected in all situations. Special cases should be handled as "feature request".
This commit is contained in:
parent
fd4df4e49a
commit
795912da24
2 changed files with 13 additions and 7 deletions
|
@ -3247,7 +3247,7 @@ System* Score::collectSystem(LayoutContext& lc)
|
|||
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// layout beams
|
||||
// layout beams + fingering
|
||||
//-------------------------------------------------------------
|
||||
|
||||
for (Segment* s : sl) {
|
||||
|
@ -3259,6 +3259,18 @@ System* Score::collectSystem(LayoutContext& lc)
|
|||
if (isTopBeam(cr)) {
|
||||
cr->beam()->layout();
|
||||
cr->beam()->addSkyline(system->staff(cr->beam()->staffIdx())->skyline());
|
||||
|
||||
// layout fingering a second time (first layout called in note->layout2())
|
||||
// to finally place fingerings above or below a beam
|
||||
|
||||
if (e->isChord()) {
|
||||
for (Note* note : toChord(e)->notes()) {
|
||||
for (Element* e : note->el()) {
|
||||
if (e->isFingering())
|
||||
e->layout();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2073,7 +2073,6 @@ void Note::layout2()
|
|||
if (e->isSymbol()) {
|
||||
qreal w = headWidth();
|
||||
Symbol* sym = toSymbol(e);
|
||||
// QPointF rp = e->readPos();
|
||||
e->layout();
|
||||
if (sym->sym() == SymId::noteheadParenthesisRight) {
|
||||
if (staff()->isTabStaff(chord()->tick())) {
|
||||
|
@ -2086,11 +2085,6 @@ void Note::layout2()
|
|||
else if (sym->sym() == SymId::noteheadParenthesisLeft) {
|
||||
e->rxpos() -= symWidth(SymId::noteheadParenthesisLeft);
|
||||
}
|
||||
/* if (sym->sym() == SymId::noteheadParenthesisLeft || sym->sym() == SymId::noteheadParenthesisRight) {
|
||||
if (!rp.isNull())
|
||||
e->setOffset(QPointF());
|
||||
}
|
||||
*/
|
||||
}
|
||||
else
|
||||
e->layout();
|
||||
|
|
Loading…
Reference in a new issue