widgets during plot interaction

Can anybody think of a good way to disable a widget

    > (specifically SpanSelector) during plot interaction from
    > the toolbar? It seems wrong when you are panning and the
    > SpanSelector is triggering over and over. Is there a
    > trivial way to detect the state of the toolbar?

I think this will require some minor tweaks to backend_bases
NavigationToolbar2 and SpanSelector. You'll want to modify
NavigationToolbar2 to make the mode "publicly accessible", eg a
get_mode method, which returns None, 'pan/zoom', or 'zoom-to-rect'
using the underlying _idPress, _idRelease, et al. Then you'll want to
modify the span selector to be toolbar aware, eg, something along the
lines of

toolbar = getattr(self.ax.figure.canvas, 'toolbar')
if toolbar is not None:
    mode = toolbar.get_mode()
    if mode is None: suppress drawing....

The getattr check is required in case someone is using the span
selector in a canvas w/o the toolbar.


Thanks, Charlie

    > -------------------------------------------------------
    > This SF.Net email is sponsored by the JBoss Inc. Get
    > Certified Today Register for a JBoss Training Course.
    > Free Certification Exam for All Training Attendees
    > Through End of 2005. For more info visit:
    > http://ads.osdn.com/?ad_idv28&alloc_id845&op=click
    > _______________________________________________
    > Matplotlib-users mailing list
    > Matplotlib-users@lists.sourceforge.net
    > https://lists.sourceforge.net/lists/listinfo/matplotlib-users