Fix #114956 - let cmdDoubleDuration() and cmdHalfDuration() reach more values
This commit is contained in:
parent
6dd82d2f78
commit
80add06a3c
2 changed files with 3 additions and 3 deletions
|
@ -2095,7 +2095,7 @@ void Score::cmdHalfDuration()
|
|||
|
||||
ChordRest* cr = static_cast<ChordRest*>(el);
|
||||
TDuration d = _is.duration().shift(1);
|
||||
if (!d.isValid() || (d.type() > TDuration::DurationType::V_64TH))
|
||||
if (!d.isValid())
|
||||
return;
|
||||
if (cr->type() == Element::Type::CHORD && (static_cast<Chord*>(cr)->noteType() != NoteType::NORMAL)) {
|
||||
//
|
||||
|
@ -2125,7 +2125,7 @@ void Score::cmdDoubleDuration()
|
|||
|
||||
ChordRest* cr = static_cast<ChordRest*>(el);
|
||||
TDuration d = _is.duration().shift(-1);
|
||||
if (!d.isValid() || (d.type() < TDuration::DurationType::V_WHOLE))
|
||||
if (!d.isValid())
|
||||
return;
|
||||
if (cr->type() == Element::Type::CHORD && (static_cast<Chord*>(cr)->noteType() != NoteType::NORMAL)) {
|
||||
//
|
||||
|
|
|
@ -291,7 +291,7 @@ TDuration TDuration::shift(int v) const
|
|||
if (_val == DurationType::V_MEASURE || _val == DurationType::V_INVALID || _val == DurationType::V_ZERO)
|
||||
return TDuration();
|
||||
int newValue = int(_val) + v;
|
||||
if ((newValue < int(DurationType::V_LONG)) || (newValue > int(DurationType::V_256TH)))
|
||||
if ((newValue < int(DurationType::V_LONG)) || (newValue > int(DurationType::V_128TH)))
|
||||
return TDuration();
|
||||
return TDuration(DurationType(newValue));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue