Skip to content

Commit

Permalink
fix #254536 Undoing a mmrest in a score> 1 page causes a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed May 3, 2018
1 parent 830eb65 commit 5e8aef2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libmscore/page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ void Page::drawHeaderFooter(QPainter* p, int area, const QString& ss) const
p->translate(-text->pos());
}

#if 0
//---------------------------------------------------------
// styleChanged
//---------------------------------------------------------
Expand All @@ -200,6 +201,7 @@ void Page::styleChanged()
if (t)
t->styleChanged();
}
#endif

//---------------------------------------------------------
// scanElements
Expand Down
2 changes: 1 addition & 1 deletion libmscore/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Page final : public Element {

virtual void write(XmlWriter&) const;
virtual void read(XmlReader&);
virtual void styleChanged() override;
virtual void styleChanged() override {}

void appendSystem(System* s);

Expand Down
4 changes: 4 additions & 0 deletions libmscore/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,10 @@ static void updateStyle(void*, Element* e)
void Score::styleChanged()
{
scanElements(0, updateStyle);
if (headerText())
headerText()->styleChanged();
if (footerText())
footerText()->styleChanged();
setLayoutAll();
}

Expand Down

0 comments on commit 5e8aef2

Please sign in to comment.