Skip to content

Commit 5bdfb03

Browse files
committed
dont get overlay image is not required
1 parent f304b42 commit 5bdfb03

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/widgets/WhiteBoard.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,22 @@ void WhiteBoard::paintEvent(QPaintEvent *event) {
8080
transform.rotate(rotates[drawing->getPageNum()]);
8181
QImage img;
8282
if(PDFMODE){
83-
img = staticImage;
8483
overlayType = CUSTOM;
85-
} else {
86-
img = overlays[drawing->getPageNum()].transformed(transform);
8784
}
8885
gridSize = (float)mainWindow->geometry().height() / (float)get_int("grid-count") * ratio;
8986
// Draw the square paper background
9087
switch(overlayType){
9188
case BLANK:
9289
break;
9390
case CUSTOM:
91+
if(PDFMODE){
92+
img = staticImage;
93+
} else {
94+
img = overlays[drawing->getPageNum()].transformed(transform);
95+
}
9496
if(img.size().width() * img.size().height() > 0){
9597
w = img.size().width() * h / img.size().height();
96-
if(w <= mainWindow->geometry().width()) {
97-
} else {
98+
if(w > mainWindow->geometry().width()) {
9899
w = mainWindow->geometry().width();
99100
h = img.size().height() * w / img.size().width();
100101
}

0 commit comments

Comments
 (0)