Merge pull request #11624 from mike-spa/hiddenStavesAdditionalSpaceFix
Fix #9345: KeySig in hidden staves cause additional space
This commit is contained in:
commit
64e0b656ec
2 changed files with 11 additions and 0 deletions
|
@ -605,6 +605,14 @@ void LayoutSystem::hideEmptyStaves(Score* score, System* system, bool isFirstSys
|
|||
SysStaff* ss = system->staff(staff->idx());
|
||||
ss->setShow(true);
|
||||
}
|
||||
// Re-create the shapes to account for newly hidden or un-hidden staves
|
||||
for (auto mb : system->measures()) {
|
||||
if (mb->isMeasure()) {
|
||||
for (auto& seg : toMeasure(mb)->segments()) {
|
||||
seg.createShapes();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LayoutSystem::layoutSystemElements(const LayoutOptions& options, LayoutContext& lc, Score* score, System* system)
|
||||
|
|
|
@ -2221,6 +2221,9 @@ void Segment::createShape(staff_idx_t staffIdx)
|
|||
{
|
||||
Shape& s = _shapes[staffIdx];
|
||||
s.clear();
|
||||
if (system() && !system()->staves().at(staffIdx)->show()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (segmentType() & (SegmentType::BarLine | SegmentType::EndBarLine | SegmentType::StartRepeatBarLine | SegmentType::BeginBarLine)) {
|
||||
setVisible(true);
|
||||
|
|
Loading…
Reference in a new issue