Skip to content

Commit 3c9ee54

Browse files
Merge pull request #28108 from juli27/fixIncDecDurationDotted
Fix inc/dec duration command when used with dotted notes
2 parents f5ec973 + be007fa commit 3c9ee54

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/engraving/dom/cmd.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,18 +3295,17 @@ void Score::cmdIncDecDuration(int nSteps, bool stepDotted)
32953295
ChordRest* cr = toChordRest(el);
32963296

32973297
// if measure rest is selected as input, then the correct initialDuration will be the
3298-
// duration of the measure's time signature, else is just the input state's duration
3299-
TDuration initialDuration;
3300-
if (cr->durationType() == DurationType::V_MEASURE) {
3298+
// duration of the measure's time signature, else is just the ChordRest's duration
3299+
TDuration initialDuration = cr->durationType();
3300+
if (initialDuration == DurationType::V_MEASURE) {
33013301
initialDuration = TDuration(cr->measure()->timesig(), true);
33023302

33033303
if (initialDuration.fraction() < cr->measure()->timesig() && nSteps > 0) {
33043304
// Duration already shortened by truncation; shorten one step less
33053305
--nSteps;
33063306
}
3307-
} else {
3308-
initialDuration = m_is.duration();
33093307
}
3308+
33103309
TDuration d = (nSteps != 0) ? initialDuration.shiftRetainDots(nSteps, stepDotted) : initialDuration;
33113310
if (!d.isValid()) {
33123311
return;

0 commit comments

Comments
 (0)