diff options
| author | tassaron | 2022-04-13 16:04:32 -0400 |
|---|---|---|
| committer | tassaron | 2022-04-13 16:04:32 -0400 |
| commit | 765a35119f258f352718a556fbea4af708236900 (patch) | |
| tree | cacd95152875f47f6fcb2d1114e5ea8499b05bcf /src/gui/preview_win.py | |
| parent | eadf0e59fda3b442bf660b562c5fc4a70ba18c33 (diff) | |
cast floats to ints when calling resize(), setX(), and setY() (argument types changed in newer version)
Diffstat (limited to 'src/gui/preview_win.py')
| -rw-r--r-- | src/gui/preview_win.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/preview_win.py b/src/gui/preview_win.py index 3db420c..27e0a59 100644 --- a/src/gui/preview_win.py +++ b/src/gui/preview_win.py @@ -25,8 +25,8 @@ class PreviewWindow(QtWidgets.QLabel): transformMode=QtCore.Qt.SmoothTransformation) # start painting the label from left upper corner - point.setX((size.width() - scaledPix.width())/2) - point.setY((size.height() - scaledPix.height())/2) + point.setX(int((size.width() - scaledPix.width())/2)) + point.setY(int((size.height() - scaledPix.height())/2)) painter.drawPixmap(point, scaledPix) def changePixmap(self, img): |
