fix regression: crash when opening staff type dialog

This commit is contained in:
ws 2018-11-09 11:21:30 +01:00
parent adf7727a38
commit 84768fe28e
2 changed files with 3 additions and 3 deletions

View file

@ -293,7 +293,7 @@ void BarLine::getY() const
int oneLine = st1->lines() == 1; int oneLine = st1->lines() == 1;
if (oneLine && _spanFrom == 0) { if (oneLine && _spanFrom == 0) {
from = BARLINE_SPAN_1LINESTAFF_FROM; from = BARLINE_SPAN_1LINESTAFF_FROM;
if (!_spanStaff) if (!_spanStaff || nstaves == 1)
to = BARLINE_SPAN_1LINESTAFF_TO; to = BARLINE_SPAN_1LINESTAFF_TO;
} }
SysStaff* sysStaff1 = system->staff(staffIdx1); SysStaff* sysStaff1 = system->staff(staffIdx1);

View file

@ -90,11 +90,11 @@ void EditStaff::setStaff(Staff* s)
instrument = *part->instrument(/*tick*/); instrument = *part->instrument(/*tick*/);
Score* score = part->score(); Score* score = part->score();
staff = new Staff(score); staff = new Staff(score);
staff->setStaffType(0, *orgStaff->staffType(0));
staff->setSmall(0, orgStaff->small(0)); staff->setSmall(0, orgStaff->small(0));
staff->setInvisible(orgStaff->invisible()); staff->setInvisible(orgStaff->invisible());
staff->setUserDist(orgStaff->userDist()); staff->setUserDist(orgStaff->userDist());
staff->setColor(orgStaff->color()); staff->setColor(orgStaff->color());
staff->setStaffType(0, *orgStaff->staffType(0));
staff->setPart(part); staff->setPart(part);
staff->setCutaway(orgStaff->cutaway()); staff->setCutaway(orgStaff->cutaway());
staff->setHideWhenEmpty(orgStaff->hideWhenEmpty()); staff->setHideWhenEmpty(orgStaff->hideWhenEmpty());