fix #301174: Undo selects an extra measure
Resolves: https://musescore.org/en/node/301174. When restoring a range selection that ends on the last tick of a measure, make sure that it is not extended to the first tick of the next measure.
This commit is contained in:
parent
b29e71f5ba
commit
40191074a3
1 changed files with 2 additions and 0 deletions
|
@ -507,6 +507,8 @@ void Selection::updateSelectedElements()
|
||||||
// the first segment for them.
|
// the first segment for them.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (s2 && s2 == s2->measure()->first())
|
||||||
|
s2 = s2->prev1(); // we want the last segment of the previous measure
|
||||||
setRange(s1, s2, staffStart, staffEnd);
|
setRange(s1, s2, staffStart, staffEnd);
|
||||||
_plannedTick1 = Fraction(-1,1);
|
_plannedTick1 = Fraction(-1,1);
|
||||||
_plannedTick2 = Fraction(-1,1);
|
_plannedTick2 = Fraction(-1,1);
|
||||||
|
|
Loading…
Reference in a new issue