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 @@ -430,7 +430,8 @@ def start_event_loop(self, timeout=0):
430
430
raise RuntimeError ("Event loop already running" )
431
431
self ._event_loop = event_loop = QtCore .QEventLoop ()
432
432
if timeout :
433
- timer = QtCore .QTimer .singleShot (timeout * 1000 , event_loop .quit )
433
+ timer = QtCore .QTimer .singleShot (round (timeout * 1000 ),
434
+ event_loop .quit )
434
435
event_loop .exec_ ()
435
436
436
437
def stop_event_loop (self , event = None ):
@@ -465,7 +466,7 @@ def blit(self, bbox=None):
465
466
if bbox is None and self .figure :
466
467
bbox = self .figure .bbox # Blit the entire canvas if bbox is None.
467
468
# repaint uses logical pixels, not physical pixels like the renderer.
468
- l , b , w , h = [pt / self ._dpi_ratio for pt in bbox .bounds ]
469
+ l , b , w , h = [round ( pt / self ._dpi_ratio ) for pt in bbox .bounds ]
469
470
t = b + h
470
471
self .repaint (l , self .rect ().height () - t , w , h )
471
472
You can’t perform that action at this time.
0 commit comments