@@ -2160,13 +2160,13 @@ def slot_verticalScrollBarChanged(self, value):
21602160 @pyqtSlot ()
21612161 def slot_miniCanvasInit (self ):
21622162 settings = QSettings ()
2163- self .ui .graphicsView .horizontalScrollBar ().setValue (settings .value ("HorizontalScrollBarValue" , DEFAULT_CANVAS_WIDTH / 3 , type = int ))
2164- self .ui .graphicsView .verticalScrollBar ().setValue (settings .value ("VerticalScrollBarValue" , DEFAULT_CANVAS_HEIGHT * 3 / 8 , type = int ))
2163+ self .ui .graphicsView .horizontalScrollBar ().setValue (settings .value ("HorizontalScrollBarValue" , int ( DEFAULT_CANVAS_WIDTH / 3 ) , type = int ))
2164+ self .ui .graphicsView .verticalScrollBar ().setValue (settings .value ("VerticalScrollBarValue" , int ( DEFAULT_CANVAS_HEIGHT * 3 / 8 ) , type = int ))
21652165
21662166 @pyqtSlot (float , float )
21672167 def slot_miniCanvasMoved (self , xp , yp ):
2168- self .ui .graphicsView .horizontalScrollBar ().setValue (xp * DEFAULT_CANVAS_WIDTH )
2169- self .ui .graphicsView .verticalScrollBar ().setValue (yp * DEFAULT_CANVAS_HEIGHT )
2168+ self .ui .graphicsView .horizontalScrollBar ().setValue (int ( xp * DEFAULT_CANVAS_WIDTH ) )
2169+ self .ui .graphicsView .verticalScrollBar ().setValue (int ( yp * DEFAULT_CANVAS_HEIGHT ) )
21702170
21712171 @pyqtSlot ()
21722172 def slot_miniCanvasCheckAll (self ):
@@ -2176,7 +2176,8 @@ def slot_miniCanvasCheckAll(self):
21762176
21772177 @pyqtSlot ()
21782178 def slot_miniCanvasCheckSize (self ):
2179- self .ui .miniCanvasPreview .setViewSize (float (self .ui .graphicsView .width ()) / DEFAULT_CANVAS_WIDTH , float (self .ui .graphicsView .height ()) / DEFAULT_CANVAS_HEIGHT )
2179+ self .ui .miniCanvasPreview .setViewSize (float (self .ui .graphicsView .width ()) / DEFAULT_CANVAS_WIDTH ,
2180+ float (self .ui .graphicsView .height ()) / DEFAULT_CANVAS_HEIGHT )
21802181
21812182 @pyqtSlot ()
21822183 def slot_handleCrash_jack (self ):
0 commit comments