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

Skip to content

Commit 5f64b1a

Browse files
committed
a minor fix of blocking_input.py
svn path=/trunk/matplotlib/; revision=8112
1 parent d7d06ad commit 5f64b1a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/matplotlib/blocking_input.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ def key_event(self):
161161
'''
162162

163163
event = self.events[-1]
164+
if event.key is None:
165+
# at least in mac os X gtk backend some key returns None.
166+
return
167+
164168
key = event.key.lower()
165169

166170
if key in ['backspace', 'delete']:
@@ -382,10 +386,6 @@ def button3(self,event):
382386
broken contour - once humpty-dumpty is broken, he can't be put
383387
back together. In inline mode, this does nothing.
384388
"""
385-
# Remove this last event - not too important for clabel use
386-
# since clabel normally doesn't have a maximum number of
387-
# events, but best for cleanliness sake.
388-
BlockingInput.pop(self)
389389

390390
if self.inline:
391391
pass

0 commit comments

Comments
 (0)