Skip to content

Commit

Permalink
Manually merged musescore#6415 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-os committed Sep 1, 2020
1 parent 74cc2ab commit f963708
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,9 @@ void Score::cmdAddTimeSig(Measure* fm, int staffIdx, TimeSig* ts, bool local)
std::pair<int, int> staffIdxRange = getStaffIdxRange(score);
for (int si = staffIdxRange.first; si < staffIdxRange.second; ++si) {
TimeSig* nsig = toTimeSig(seg->element(si * VOICES));
if (!nsig)
if (!nsig) {
continue;
}
nsig->undoChangeProperty(Pid::SHOW_COURTESY, ts->showCourtesySig());
nsig->undoChangeProperty(Pid::TIMESIG, QVariant::fromValue(ts->sig()));
nsig->undoChangeProperty(Pid::TIMESIG_TYPE, int(ts->timeSigType()));
Expand Down Expand Up @@ -3450,7 +3451,7 @@ void Score::localTimeDelete()
MeasureBase* ie;

if (endSegment) {
ie = endSegment->prev() ? endSegment->measure() : endSegment->measure()->prev();
ie = endSegment->prev(SegmentType::ChordRest) ? endSegment->measure() : endSegment->measure()->prev();
} else {
ie = lastMeasure();
}
Expand Down Expand Up @@ -3527,6 +3528,10 @@ void Score::localTimeDelete()

void Score::timeDelete(Measure* m, Segment* startSegment, const Fraction& f)
{
if (f.isZero()) {
return;
}

const Fraction tick = startSegment->rtick();
const Fraction len = f;
const Fraction etick = tick + len;
Expand Down
2 changes: 1 addition & 1 deletion libmscore/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3354,7 +3354,7 @@ void Score::selectRange(Element* e, int staffIdx)
}
ChordRest* ocr = toChordRest(oe);

Segment* endSeg = tick2segmentMM(ocr->segment()->tick() + ocr->actualTicks());
Segment* endSeg = tick2segmentMM(ocr->segment()->tick() + ocr->actualTicks(), true);
if (!endSeg) {
endSeg = ocr->segment()->next();
}
Expand Down

0 comments on commit f963708

Please sign in to comment.