aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2018-03-11 21:18:53 -0400
committerZackaryWelch <welch.zackary@gmail.com>2018-03-11 21:18:53 -0400
commit4b126da97fe1a6180507b13c36591743b44d0d27 (patch)
tree3e496f67eab3ddcb5ffd2e8b11a06dbd0665c74c /src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-4b126da97fe1a6180507b13c36591743b44d0d27.tar.gz
lumina-4b126da97fe1a6180507b13c36591743b44d0d27.tar.bz2
lumina-4b126da97fe1a6180507b13c36591743b44d0d27.zip
Added multithreading support for the MuPDF backend and fixed rendering errors
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
index bece454e..5c7fa1dd 100644
--- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
+++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
@@ -185,23 +185,23 @@ void PrintWidget::layoutPages() {
void PrintWidget::populateScene()
{
for (int i = 0; i < pages.size(); i++){
- scene->removeItem(pages.at(i));
+ scene->removeItem(pages.at(i));
}
qDeleteAll(pages);
pages.clear();
//qDebug() << "populateScene";
if(pictures==0){ return; } //nothing to show yet
int numPages = pictures->count();
- //Replace from loadingHash resolution
- QSize paperSize = pictures->value(0).size();
- //qDebug() << "Image paperSize" << paperSize;
-
- //Changes the paper orientation if rotated by 90 or 270 degrees
- if(degrees == 90 or degrees == 270)
- paperSize.transpose();
for (int i = 0; i < numPages; i++) {
QImage pagePicture = pictures->value(i);
+
+ QSize paperSize = pictures->value(i).size();
+
+ //Changes the paper orientation if rotated by 90 or 270 degrees
+ if(degrees == 90 or degrees == 270)
+ paperSize.transpose();
+
if(degrees != 0) {
pagePicture = pagePicture.transformed(rotMatrix, Qt::SmoothTransformation);
//qDebug() << "Rotating by: " << degrees << " degrees";
bgstack15