[SciPy-dev] Re: [Scipy-cvs] world/chaco/demo wxdemo_plot.py,1.28,1.29

Eric Jones eric at enthought.com
Mon Mar 3 23:39:51 CST 2003


How about mapping this to the ESC key?

eric

dmorrill at scipy.org wrote ..
> Update of /home/cvsroot/world/chaco/demo
> In directory scipy.org:/tmp/cvs-serv28406
> 
> Modified Files:
> 	wxdemo_plot.py 
> Log Message:
> Added ability to deselect all objects by ctrl-clicking the PlotWindow.
> 
> 
> Index: wxdemo_plot.py
> ===================================================================
> RCS file: /home/cvsroot/world/chaco/demo/wxdemo_plot.py,v
> retrieving revision 1.28
> retrieving revision 1.29
> diff -C2 -d -r1.28 -r1.29
> *** wxdemo_plot.py	1 Mar 2003 17:35:56 -0000	1.28
> --- wxdemo_plot.py	3 Mar 2003 16:21:45 -0000	1.29
> ***************
> *** 985,992 ****
>   
>      def on_left_up ( self, event ):
>          if self._x is None:
>             return
>             
> -        global object
>          objects = self.objects_at( event )
>          stack   = []
> --- 985,998 ----
>   
>      def on_left_up ( self, event ):
> +        global object
> + 
>          if self._x is None:
>             return
> + 
> +        if event.ControlDown():
> +           object = self._x = None
> +           self.select( None )
> +           return
>             
>          objects = self.objects_at( event )
>          stack   = []
> ***************
> *** 1009,1013 ****
>          except:
>             self._last_top = object = None
> !        if event.ShiftDown() or event.ControlDown() or event.MetaDown():
>             self._x = None
>             return
> --- 1015,1019 ----
>          except:
>             self._last_top = object = None
> !        if event.ShiftDown() or event.MetaDown():
>             self._x = None
>             return
> 
> 
> _______________________________________________
> Scipy-cvs mailing list
> Scipy-cvs at scipy.org
> http://scipy.net/mailman/listinfo/scipy-cvs


More information about the Scipy-dev mailing list