Skip to content

Commit

Permalink
Merge pull request #2351 from lasconic/fix-84351
Browse files Browse the repository at this point in the history
fix #84351: Crash when saving with instrument name selected and conti…
  • Loading branch information
lasconic committed Jan 22, 2016
2 parents 7eacc13 + a619a84 commit 439bd74
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
4 changes: 0 additions & 4 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3126,10 +3126,6 @@ void Score::layoutSystems()
if (t == Element::Type::VBOX || t == Element::Type::TBOX || t == Element::Type::FBOX) {
System* system = getNextSystem(false, true);
system->setSameLine(false);
foreach(SysStaff* ss, *system->staves())
delete ss;
system->staves()->clear();

system->setWidth(w);
VBox* vbox = static_cast<VBox*>(curMeasure);
vbox->setParent(system);
Expand Down
6 changes: 1 addition & 5 deletions libmscore/scorefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,7 @@ void Score::saveCompressedFile(QFileInfo& info, bool onlySelection)
QImage Score::createThumbnail()
{
LayoutMode layoutMode = _layoutMode;
if (layoutMode != LayoutMode::PAGE) {
startCmd();
ScoreElement::undoChangeProperty(P_ID::LAYOUT_MODE, QVariant(int(LayoutMode::PAGE)));
doLayout();
}
switchToPageMode();
Page* page = pages().at(0);
QRectF fr = page->abbox();
qreal mag = 256.0 / qMax(fr.width(), fr.height());
Expand Down
6 changes: 1 addition & 5 deletions mscore/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1495,11 +1495,7 @@ void MuseScore::printFile()
return;

LayoutMode layoutMode = cs->layoutMode();
if (layoutMode != LayoutMode::PAGE) {
cs->startCmd();
cs->ScoreElement::undoChangeProperty(P_ID::LAYOUT_MODE, int(LayoutMode::PAGE));
cs->doLayout();
}
cs->switchToPageMode();

QPainter p(&printerDev);
p.setRenderHint(QPainter::Antialiasing, true);
Expand Down
6 changes: 1 addition & 5 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2182,11 +2182,7 @@ static bool processNonGui()
}
}
else if (fn.endsWith(".png")) {
if (layoutMode != LayoutMode::PAGE) {
cs->startCmd();
cs->ScoreElement::undoChangeProperty(P_ID::LAYOUT_MODE, int(LayoutMode::PAGE));
cs->doLayout();
}
cs->switchToPageMode();
rv = mscore->savePng(cs, fn);
}
else if (fn.endsWith(".svg")) {
Expand Down

0 comments on commit 439bd74

Please sign in to comment.