From b2dc8ded7cae724357bb23c88ef954fb94facac8 Mon Sep 17 00:00:00 2001 From: sammik Date: Sun, 3 Nov 2024 20:55:41 +0100 Subject: [PATCH 1/2] add courtesy keysig to last measure even if it is followed by frame --- src/engraving/rendering/score/systemlayout.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engraving/rendering/score/systemlayout.cpp b/src/engraving/rendering/score/systemlayout.cpp index c9ba706b6522e..f76406c991779 100644 --- a/src/engraving/rendering/score/systemlayout.cpp +++ b/src/engraving/rendering/score/systemlayout.cpp @@ -326,11 +326,9 @@ System* SystemLayout::collectSystem(LayoutContext& ctx) * **********************************************************/ // Brake cross-measure beams - // Create end barlines if (ctx.state().prevMeasure() && ctx.state().prevMeasure()->isMeasure()) { Measure* pm = toMeasure(ctx.mutState().prevMeasure()); BeamLayout::breakCrossMeasureBeams(pm, ctx); - MeasureLayout::createEndBarLines(pm, true, ctx); } // hide empty staves @@ -341,11 +339,12 @@ System* SystemLayout::collectSystem(LayoutContext& ctx) SystemLayout::layoutSystem(system, ctx, layoutSystemMinWidth, ctx.state().firstSystem(), ctx.state().firstSystemIndent()); curSysWidth += system->leftMargin(); - // add system trailer if needed (cautionary time/key signatures etc) + // Create end barlines and system trailer if needed (cautionary time/key signatures etc) Measure* lm = system->lastMeasure(); if (lm) { Measure* nm = lm->nextMeasure(); if (nm) { + MeasureLayout::createEndBarLines(lm, true, ctx); MeasureLayout::addSystemTrailer(lm, nm, ctx); } } From 04f5687cd5af5975452269755fa735d6963b6d81 Mon Sep 17 00:00:00 2001 From: sammik Date: Mon, 4 Nov 2024 16:17:31 +0100 Subject: [PATCH 2/2] fix test --- src/engraving/rendering/score/systemlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engraving/rendering/score/systemlayout.cpp b/src/engraving/rendering/score/systemlayout.cpp index f76406c991779..d68a9c148d31a 100644 --- a/src/engraving/rendering/score/systemlayout.cpp +++ b/src/engraving/rendering/score/systemlayout.cpp @@ -342,9 +342,9 @@ System* SystemLayout::collectSystem(LayoutContext& ctx) // Create end barlines and system trailer if needed (cautionary time/key signatures etc) Measure* lm = system->lastMeasure(); if (lm) { + MeasureLayout::createEndBarLines(lm, true, ctx); Measure* nm = lm->nextMeasure(); if (nm) { - MeasureLayout::createEndBarLines(lm, true, ctx); MeasureLayout::addSystemTrailer(lm, nm, ctx); } }