@@ -147,7 +147,7 @@ def draw(self):
147147 # causes problems with code that uses the result of the
148148 # draw() to update plot elements.
149149 FigureCanvasAgg .draw (self )
150- self ._priv_update ()
150+ self .update ()
151151
152152 def blit (self , bbox = None ):
153153 """
@@ -184,22 +184,6 @@ def __init__(self, figure):
184184 self ._drawRect = None
185185 self .blitbox = None
186186 self .setAttribute (QtCore .Qt .WA_OpaquePaintEvent )
187- # it has been reported that Qt is semi-broken in a windows
188- # environment. If `self.draw()` uses `update` to trigger a
189- # system-level window repaint (as is explicitly advised in the
190- # Qt documentation) the figure responds very slowly to mouse
191- # input. The work around is to directly use `repaint`
192- # (against the advice of the Qt documentation). The
193- # difference between `update` and repaint is that `update`
194- # schedules a `repaint` for the next time the system is idle,
195- # where as `repaint` repaints the window immediately. The
196- # risk is if `self.draw` gets called with in another `repaint`
197- # method there will be an infinite recursion. Thus, we only
198- # expose windows users to this risk.
199- if sys .platform .startswith ('win' ):
200- self ._priv_update = self .repaint
201- else :
202- self ._priv_update = self .update
203187
204188
205189FigureCanvas = FigureCanvasQTAgg
0 commit comments