Merge pull request #13618 from mike-spa/invisibleItemBugFix
Invisible cautionary clef bug fix
This commit is contained in:
commit
f1d80b3961
2 changed files with 12 additions and 6 deletions
|
@ -4654,15 +4654,21 @@ Fraction Measure::shortestChordRest() const
|
|||
void Measure::respaceSegments()
|
||||
{
|
||||
double x = 0.0;
|
||||
// Find starting x position (i.e. position of first relevant segment)
|
||||
for (Segment& s : m_segments) {
|
||||
if (!s.enabled() || s.allElementsInvisible()) {
|
||||
continue;
|
||||
}
|
||||
x = s.x() + s.width();
|
||||
if (s.next()) {
|
||||
s.next()->setPosX(x);
|
||||
if (s.enabled() && s.visible() && !s.allElementsInvisible()) {
|
||||
x = s.x();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Start respacing segments
|
||||
for (Segment& s : m_segments) {
|
||||
s.setPosX(x);
|
||||
if (s.enabled() && s.visible() && !s.allElementsInvisible()) {
|
||||
x += s.width();
|
||||
}
|
||||
}
|
||||
// Update measure width
|
||||
setWidth(x);
|
||||
}
|
||||
}
|
||||
|
|
BIN
vtest/scores/invisible.mscz
Normal file
BIN
vtest/scores/invisible.mscz
Normal file
Binary file not shown.
Loading…
Reference in a new issue