Fix Issue with Shift Selecting Across Staffs
Assert enforces ending staffidx to be higher than starting staffidx. This code reverses the two indexes if they don't satisfy idx2 >= idx1.
This commit is contained in:
parent
7b96c73531
commit
a7e415974a
1 changed files with 6 additions and 0 deletions
|
@ -3407,6 +3407,12 @@ void Score::selectRange(Element* e, int staffIdx)
|
|||
if (selectedElement && e->type() == selectedElement->type()) {
|
||||
int idx1 = selectedElement->staffIdx();
|
||||
int idx2 = e->staffIdx();
|
||||
if (idx2 < idx1) {
|
||||
int temp = idx1;
|
||||
idx1 = idx2;
|
||||
idx2 = temp;
|
||||
}
|
||||
|
||||
if (idx1 >= 0 && idx2 >= 0) {
|
||||
Fraction t1 = selectedElement->tick();
|
||||
Fraction t2 = e->tick();
|
||||
|
|
Loading…
Reference in a new issue