Skip to content

Commit

Permalink
fix #17444: Repeat measure sign affects all staves
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Jul 21, 2012
1 parent 3432cdc commit 13ded89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2704,10 +2704,12 @@ bool Measure::isFullMeasureRest()
// isRepeatMeasure
//---------------------------------------------------------

bool Measure::isRepeatMeasure()
bool Measure::isRepeatMeasure(Part* part)
{
int strack = 0;
int etrack = score()->nstaves() * VOICES;
int firstStaffIdx = score()->staffIdx(part);
int nextStaffIdx = firstStaffIdx + part->nstaves();
int strack = firstStaffIdx * VOICES;
int etrack = nextStaffIdx * VOICES;

Segment* s = first(SegChordRest);

Expand Down
3 changes: 2 additions & 1 deletion libmscore/measure.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class TieMap;
class SpannerMap;
class AccidentalState;
class Spanner;
class Part;

//---------------------------------------------------------
// MStaff
Expand Down Expand Up @@ -246,7 +247,7 @@ class Measure : public MeasureBase {
bool hasVoice(int track) const;
bool isMeasureRest(int staffIdx);
bool isFullMeasureRest();
bool isRepeatMeasure();
bool isRepeatMeasure(Part* part);
bool visible(int staffIdx) const;
bool slashStyle(int staffIdx) const;

Expand Down
2 changes: 1 addition & 1 deletion libmscore/rendermidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void Score::renderPart(EventMap* events, Part* part)
int endTick = startTick + rs->len;
int tickOffset = rs->utick - rs->tick;
for (Measure* m = tick2measure(startTick); m; m = m->nextMeasure()) {
if (lastMeasure && m->isRepeatMeasure()) {
if (lastMeasure && m->isRepeatMeasure(part)) {
int offset = m->tick() - lastMeasure->tick();
collectMeasureEvents(events, lastMeasure, part, tickOffset + offset);
}
Expand Down

0 comments on commit 13ded89

Please sign in to comment.