fix #45546: crash on split staff in non-top part
This commit is contained in:
parent
1634901bc9
commit
18ca4c9de4
1 changed files with 3 additions and 1 deletions
|
@ -2167,7 +2167,9 @@ void Score::splitStaff(int staffIdx, int splitPoint)
|
|||
Part* p = s->part();
|
||||
Staff* ns = new Staff(this);
|
||||
ns->setPart(p);
|
||||
undoInsertStaff(ns, staffIdx+1, false);
|
||||
// convert staffIdx from score-relative to part-relative
|
||||
int staffIdxPart = staffIdx - p->staff(0)->idx();
|
||||
undoInsertStaff(ns, staffIdxPart + 1, false);
|
||||
|
||||
Clef* clef = new Clef(this);
|
||||
clef->setClefType(ClefType::F);
|
||||
|
|
Loading…
Reference in a new issue