Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Fix for claudia not starting (#341)
Browse files Browse the repository at this point in the history
* Fix for claudia not starting

* converting self.fFakeWidth and self.fFakeHeight to integers
  • Loading branch information
clarking committed Mar 31, 2022
1 parent c146ff9 commit 56b078f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/canvaspreviewframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def __init__(self, parent):
self.fScale = 1.0
self.fScene = None
self.fRealParent = None
self.fFakeWidth = 0.0
self.fFakeHeight = 0.0
self.fFakeWidth = 0
self.fFakeHeight = 0

self.fRenderSource = self.getRenderSource()
self.fRenderTarget = QRectF(0, 0, 0, 0)
Expand All @@ -70,8 +70,8 @@ def init(self, scene, realWidth, realHeight, useCustomPaint = False):
padding = 6

self.fScene = scene
self.fFakeWidth = float(realWidth) / 15
self.fFakeHeight = float(realHeight) / 15
self.fFakeWidth = int(realWidth / 15)
self.fFakeHeight = int(realHeight / 15)

self.setMinimumSize(self.fFakeWidth+padding, self.fFakeHeight+padding)
self.setMaximumSize(self.fFakeWidth*4+padding, self.fFakeHeight+padding)
Expand Down Expand Up @@ -198,7 +198,7 @@ def paintEvent(self, event):

painter.setBrush(self.fViewBrush)
painter.setPen(self.fViewPen)
painter.drawRect(self.fViewRect[iX], self.fViewRect[iY], maxWidth, maxHeight)
painter.drawRect(QRectF(self.fViewRect[iX], self.fViewRect[iY], maxWidth, maxHeight))

if self.fUseCustomPaint:
event.accept()
Expand Down

0 comments on commit 56b078f

Please sign in to comment.