Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mmRest clef collision #21729

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/engraving/rendering/dev/measurelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,8 @@ void MeasureLayout::layoutMeasureElements(Measure* m, LayoutContext& ctx)
continue;
}
staff_idx_t staffIdx = e->staffIdx();
bool modernMMRest = e->isMMRest() && !ctx.conf().styleB(Sid::oldStyleMultiMeasureRests);
bool modernMMRest = e->isMMRest() && (!ctx.conf().styleB(Sid::oldStyleMultiMeasureRests)
|| toMMRest(e)->ldata()->number > ctx.conf().styleI(Sid::mmRestOldStyleMaxMeasures));
if ((e->isRest() && toRest(e)->isFullMeasureRest()) || e->isMMRest() || e->isMeasureRepeat()) {
//
// element has to be centered in free space
Expand Down
6 changes: 0 additions & 6 deletions src/engraving/rendering/dev/tlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4270,12 +4270,6 @@ void TLayout::layoutMMRest(const MMRest* item, MMRest::LayoutData* ldata, const

ldata->restSyms = restSyms;
ldata->symsWidth = symsWidth;

//double symHeight = item->symBbox(ldata->restSyms.at(0)).height();
//ldata->setBbox(RectF((ldata->restWidth() - ldata->symsWidth) * .5, -item->spatium(), ldata->symsWidth, symHeight));
} else { // H-bar
//double vStrokeHeight = ctx.conf().styleMM(Sid::mmRestHBarVStrokeHeight);
//ldata->setBbox(RectF(0.0, -(vStrokeHeight * .5), ldata->restWidth(), vStrokeHeight));
}

// Only need to set y position here; x position is handled in MeasureLayout::layoutMeasureElements()
Expand Down
Binary file added vtest/scores/mmrest-16.mscz
Binary file not shown.
Loading