File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 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):
430430 raise RuntimeError ("Event loop already running" )
431431 self ._event_loop = event_loop = QtCore .QEventLoop ()
432432 if timeout :
433- timer = QtCore .QTimer .singleShot (timeout * 1000 , event_loop .quit )
433+ timer = QtCore .QTimer .singleShot (round (timeout * 1000 ),
434+ event_loop .quit )
434435 event_loop .exec_ ()
435436
436437 def stop_event_loop (self , event = None ):
@@ -465,7 +466,7 @@ def blit(self, bbox=None):
465466 if bbox is None and self .figure :
466467 bbox = self .figure .bbox # Blit the entire canvas if bbox is None.
467468 # 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 ]
469470 t = b + h
470471 self .repaint (l , self .rect ().height () - t , w , h )
471472
You can’t perform that action at this time.
0 commit comments