Skip to content

Commit

Permalink
Merge pull request #3101 from ericfont/Prevent-256th-rests-from-Q-or-…
Browse files Browse the repository at this point in the history
…ShiftQ

2.1 fix to prevent Q or Shift+Q from resulting in 256th rests
  • Loading branch information
lasconic committed Mar 24, 2017
2 parents cf5a1d7 + aeee109 commit ab899a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libmscore/durationtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ void TDuration::shiftType(int nSteps, bool stepDotted)
newValue = int(_val) + nSteps;
}

if ((newValue < int(DurationType::V_LONG)) || (newValue > int(DurationType::V_128TH)))
if ((newValue < int(DurationType::V_LONG)) || (newValue > int(DurationType::V_128TH)) ||
((newValue >= int(DurationType::V_128TH)) && (newDots >= 1)) ||
((newValue >= int(DurationType::V_64TH)) && (newDots >= 2)) ||
((newValue >= int(DurationType::V_32ND)) && (newDots >= 3)))
setType(DurationType::V_INVALID);
else {
setType(DurationType(newValue));
Expand Down

0 comments on commit ab899a0

Please sign in to comment.