Skip to content

Commit

Permalink
print: fix page size/orientation settings
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Aug 2, 2016
1 parent d4cc062 commit f0de350
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mscore/file.cpp
Expand Up @@ -1471,7 +1471,11 @@ void MuseScore::printFile()
{
QPrinter printerDev(QPrinter::HighResolution);
const PageFormat* pf = cs->pageFormat();
printerDev.setPaperSize(pf->size(), QPrinter::Inch);
QPageSize ps(QPageSize::id(pf->size(), QPageSize::Inch));
printerDev.setPageSize(ps);
printerDev.setPageOrientation(
pf->size().width() > pf->size().height() ? QPageLayout::Landscape : QPageLayout::Portrait
);

printerDev.setCreator("MuseScore Version: " VERSION);
printerDev.setFullPage(true);
Expand Down

5 comments on commit f0de350

@lasconic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jojo-Schmitz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this fix apply to 2.0.4 too?

@lasconic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know yet. AFAIU, it has only been tested on Linux and printing is sensible enough that I don't want to risk it. Also, I don't understand what would happen with a custom size.

@sidewayss
Copy link
Contributor

@sidewayss sidewayss commented on f0de350 Aug 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how a custom size would matter here. What is your concern?

After 2 months and many commits on your end I'm manually rebasing my Points/Pixels branch. Simple enough for this file, as not much changed in that time. This is a block of code that is affected by my Points/Pixels changes; anything relating to PageFormat is affected. My 1 change to this block is from ::Inch to ::Point, and I am trying to think if it affects anything downstream with this new code, but I don't see a problem. I'll find out more once I've compiled, but I don't see how it would cause a problem, so long as the units are consistent.

@Jojo-Schmitz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The used thatr reported the issue seems to be using Windows (by looking at the file properties of the mscz attached to the issue) and comfirned that this change fixes the issue for him, see https://musescore.org/de/node/119666#comment-549571

Please sign in to comment.