Skip to content
Permalink
Browse files

fix 45946: page numbering in export parts as PDF

for *-Score_and_Parts.pdf, to be the same as if score and parts had been
generated separatly.
  • Loading branch information...
Jojo-Schmitz committed Jan 29, 2015
1 parent 5b6da6a commit 656170b43314585440b82e41cc5bece502ec97f9
Showing with 1 addition and 13 deletions.
  1. +1 −13 mscore/file.cpp
@@ -1926,13 +1926,6 @@ bool MuseScore::savePdf(QList<Score*> cs, const QString& saveName)
double mag = printerDev.logicalDpiX() / MScore::DPI;
p.scale(mag, mag);

//
// start pageOffset with configured offset of
// first score
//
int pageOffset = 0;
if (firstScore)
pageOffset = firstScore->pageNumberOffset();
bool firstPage = true;
for (Score* s : cs) {
LayoutMode layoutMode = s->layoutMode();
@@ -1942,10 +1935,7 @@ bool MuseScore::savePdf(QList<Score*> cs, const QString& saveName)
s->doLayout();
}
s->setPrinting(true);
//
// here we ignore the configured page offset
//
int oldPageOffset = s->pageNumberOffset();
int pageOffset = s->pageNumberOffset();
s->setPageNumberOffset(pageOffset);
bool oldFirstPageNumber = s->style(StyleIdx::footerFirstPage).toBool();
s->style()->set(StyleIdx::footerFirstPage, true);
@@ -1962,11 +1952,9 @@ bool MuseScore::savePdf(QList<Score*> cs, const QString& saveName)
firstPage = false;
s->print(&p, n);
}
pageOffset += pages;

//reset score
s->setPrinting(false);
s->setPageNumberOffset(oldPageOffset);
s->style()->set(StyleIdx::footerFirstPage, oldFirstPageNumber);
s->doLayout();
if (layoutMode != s->layoutMode())

1 comment on commit 656170b

@Jojo-Schmitz

This comment has been minimized.

Copy link
Owner Author

Jojo-Schmitz commented on 656170b May 8, 2015

needs to get redone, conflicts with 64780e9

Please sign in to comment.
You can’t perform that action at this time.