File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,8 @@ def start_event_loop(self, timeout=0):
427
427
raise RuntimeError ("Event loop already running" )
428
428
self ._event_loop = event_loop = QtCore .QEventLoop ()
429
429
if timeout > 0 :
430
- timer = QtCore .QTimer .singleShot (timeout * 1000 , event_loop .quit )
430
+ timer = QtCore .QTimer .singleShot (int (timeout * 1000 ),
431
+ event_loop .quit )
431
432
event_loop .exec_ ()
432
433
433
434
def stop_event_loop (self , event = None ):
@@ -462,7 +463,7 @@ def blit(self, bbox=None):
462
463
if bbox is None and self .figure :
463
464
bbox = self .figure .bbox # Blit the entire canvas if bbox is None.
464
465
# repaint uses logical pixels, not physical pixels like the renderer.
465
- l , b , w , h = [pt / self ._dpi_ratio for pt in bbox .bounds ]
466
+ l , b , w , h = [int ( pt / self ._dpi_ratio ) for pt in bbox .bounds ]
466
467
t = b + h
467
468
self .repaint (l , self .rect ().height () - t , w , h )
468
469
You can’t perform that action at this time.
0 commit comments