Fix for claudia not starting (#341)
* Fix for claudia not starting * converting self.fFakeWidth and self.fFakeHeight to integers
This commit is contained in:
parent
c146ff90ef
commit
56b078f660
|
@ -56,8 +56,8 @@ class CanvasPreviewFrame(QFrame):
|
|||
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)
|
||||
|
@ -70,8 +70,8 @@ class CanvasPreviewFrame(QFrame):
|
|||
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)
|
||||
|
@ -198,7 +198,7 @@ class CanvasPreviewFrame(QFrame):
|
|||
|
||||
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()
|
||||
|
|
Loading…
Reference in New Issue