Skip to content

Commit

Permalink
Merge pull request #4113 from mattmcclinch/277864-exchange-voice
Browse files Browse the repository at this point in the history
fix #277864: Exchange voice does not add rests to complete voice 1
  • Loading branch information
anatoly-os committed Nov 21, 2018
2 parents 21a7e82 + 5ae14eb commit da358b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3767,6 +3767,11 @@ void Score::undoExchangeVoice(Measure* measure, int v1, int v2, int staff1, int
ChordRest* cr = toChordRest(s->element(track));
if (cr == 0)
continue;
if (cr->isRest()) {
Rest* r = toRest(cr);
if (r->isGap())
r->undoChangeProperty(Pid::GAP, false);
}
if (ctick < s->tick()) {
// fill gap
int ticks = s->tick() - ctick;
Expand Down
6 changes: 3 additions & 3 deletions mtest/libmscore/exchangevoices/exchangevoices-gliss-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
<sigN>4</sigN>
<sigD>4</sigD>
</TimeSig>
<location>
<fractions>1/2</fractions>
</location>
<Rest>
<durationType>half</durationType>
</Rest>
<Chord>
<durationType>quarter</durationType>
<Note>
Expand Down

0 comments on commit da358b1

Please sign in to comment.