Skip to content
Merged
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
6 changes: 5 additions & 1 deletion src/project/internal/notationproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "engraving/compat/engravingcompat.h"
#include "engraving/dom/excerpt.h"
#include "engraving/dom/masterscore.h"
#include "engraving/dom/measurebase.h"
#include "engraving/dom/repeatlist.h"
#include "engraving/editing/editscoreproperties.h"
#include "engraving/engravingerrors.h"
Expand Down Expand Up @@ -578,7 +579,10 @@ muse::Ret NotationProject::savePage(const muse::io::path_t& path, const size_t p
range.startStaffIdx = 0;
range.endStaffIdx = score->nstaves();
range.startMeasure = systems.front()->first();
range.endMeasure = systems.back()->last();
// StaffWrite::writeStaff stops before reaching endMeasure, so use the measure after
// the last one we want, otherwise the page's last measure/frame is dropped
MeasureBase* lastMeasure = systems.back()->last();
range.endMeasure = lastMeasure ? lastMeasure->next() : nullptr;

write::WriteContext ctx(score);
ctx.setRange(range);
Expand Down
Loading