Revision: 8367
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8367&view=rev
Author:   jdh2358
Date:     2010-06-02 13:36:46 +0000 (Wed, 02 Jun 2010)

Log Message:
-----------
handle is None keys by returning

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/backend_bases.py
    trunk/matplotlib/lib/matplotlib/image.py

Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py    2010-06-02 03:22:57 UTC 
(rev 8366)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py    2010-06-02 13:36:46 UTC 
(rev 8367)
@@ -2062,6 +2062,9 @@
         #    self.destroy() # how cruel to have to destroy oneself!
         #    return
 
+        if event.key is None:
+            return
+
         # Load key-mappings from your matplotlibrc file.
         fullscreen_keys = rcParams['keymap.fullscreen']
         home_keys = rcParams['keymap.home']
@@ -2128,8 +2131,7 @@
                 ax.set_xscale('log')
                 ax.figure.canvas.draw()
 
-        elif event.key is not None and \
-                 (event.key.isdigit() and event.key!='0') or event.key in all:
+        elif (event.key.isdigit() and event.key!='0') or event.key in all:
             # keys in list 'all' enables all axes (default key 'a'),
             # otherwise if key is a number only enable this particular axes
             # if it was the axes, where the event was raised

Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py    2010-06-02 03:22:57 UTC (rev 
8366)
+++ trunk/matplotlib/lib/matplotlib/image.py    2010-06-02 13:36:46 UTC (rev 
8367)
@@ -663,6 +663,13 @@
         self._Ay = y
         self._imcache = None
 
+        # I am adding this in accor with _AxesImageBase.set_data --
+        # examples/pylab_examples/image_nonuniform.py was breaking on
+        # the call to _get_unsampled_image when the oldxslice attr was
+        # accessed - JDH 3/3/2010
+        self._oldxslice = None
+        self._oldyslice = None
+
     def set_array(self, *args):
         raise NotImplementedError('Method not supported')
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------

_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to