Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83b71a8

Browse files
committed
removed idle support from tkagg until I figure out interrupts
svn path=/trunk/matplotlib/; revision=5655
1 parent 8302a79 commit 83b71a8

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

lib/matplotlib/backends/backend_qt4.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from matplotlib import verbose
88
from matplotlib.cbook import is_string_like, onetrue
99
from matplotlib.backend_bases import RendererBase, GraphicsContextBase, \
10-
FigureManagerBase, FigureCanvasBase, NavigationToolbar2, cursors
10+
FigureManagerBase, FigureCanvasBase, NavigationToolbar2, IdleEvent, cursors
1111
from matplotlib._pylab_helpers import Gcf
1212
from matplotlib.figure import Figure
1313
from matplotlib.mathtext import MathTextParser
@@ -94,10 +94,15 @@ def __init__( self, figure ):
9494
FigureCanvasBase.__init__( self, figure )
9595
self.figure = figure
9696
self.setMouseTracking( True )
97-
97+
# hide until we can test and fix
98+
#self.startTimer(backend_IdleEvent.milliseconds)
9899
w,h = self.get_width_height()
99100
self.resize( w, h )
100101

102+
def __timerEvent(self, event):
103+
# hide until we can test and fix
104+
self.mpl_idle_event(event)
105+
101106
def mousePressEvent( self, event ):
102107
x = event.pos().x()
103108
# flipy so y=0 is bottom of canvas

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ def __init__(self, figure, master=None, resize_callback=None):
178178
def on_idle(*ignore):
179179
self.idle_event()
180180
return True
181-
t = cbook.Idle(on_idle)
182181

183-
self._tkcanvas.after_idle(lambda *ignore: t.start())
182+
# disable until you figure out how to handle threads and interrupts
183+
#t = cbook.Idle(on_idle)
184+
#self._tkcanvas.after_idle(lambda *ignore: t.start())
184185

185186
def resize(self, event):
186187
width, height = event.width, event.height

lib/matplotlib/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def _get_handles(self, handles, texts):
271271
legline_marker.set_linestyle('None')
272272
self._set_artist_props(legline_marker)
273273
# we don't want to add this to the return list because
274-
# the texts and handles are assumed to be in one to ne
274+
# the texts and handles are assumed to be in one-to-one
275275
# correpondence.
276276
legline._legmarker = legline_marker
277277

0 commit comments

Comments
 (0)