Skip to content

spanselector does not respect widgetlock #1368

Closed

Description

@juliantaylor

the spanselector does not ignore events when the widgetlock is set (e.g. when in zoom or pan mode)

in zoom mode it is not really bad, it just draws two things but in pan mode it flickers a lot.
to reproduce it just use the spanselector example in the source and go into zoom and pan mode.

when panning in the shipped example I also get this traceback:

  File "/scisoft/lib/python2.7/lib-tk/Tkinter.py", line 1410, in __call__
    return self.func(*args)
  File "/scratch/jtaylor/progs/matplotlib/build/lib.linux-i686-2.7/matplotlib/backends/backend_tkagg.py", line 413, in button_release_event
    FigureCanvasBase.button_release_event(self, x, y, num, guiEvent=event)
  File "/scratch/jtaylor/progs/matplotlib/build/lib.linux-i686-2.7/matplotlib/backend_bases.py", line 1718, in button_release_event
    self.callbacks.process(s, event)
  File "/scratch/jtaylor/progs/matplotlib/build/lib.linux-i686-2.7/matplotlib/cbook.py", line 340, in process
    proxy(*args, **kwargs)
  File "/scratch/jtaylor/progs/matplotlib/build/lib.linux-i686-2.7/matplotlib/cbook.py", line 218, in __call__
    return mtd(*args, **kwargs)
  File "/scratch/jtaylor/progs/matplotlib/build/lib.linux-i686-2.7/matplotlib/widgets.py", line 1096, in release
    self.onselect(vmin, vmax)
  File "../../examples/widgets/span_selector.py", line 31, in onselect
    ax2.set_xlim(thisx[0], thisx[-1])

The rectangle selector does not have this issue as it checks for widgetlock in its ignore function

it affects git head and 1.1.0, possibly also older versions.

Activity

  1. tacaswell commented on Jan 16, 2014

    @tacaswell
    Member

    This is still an issue master. It looks like the various call-backs that are set up with SpanSelector + the pan conflict.

    @fariza 's MEP 22 will probably go a long way towards fixing the underlying issue.

  2. fariza commented on Jan 16, 2014

    @fariza
    Member

    One question...

    Is the Canvas supposed to protect itself with the widgetlock or whoever whants to draw have to check?

  3. tacaswell commented on Nov 26, 2014

    @tacaswell
    Member

    @juliantaylor this might be fixed on current master, #3502 refactored how much of this was handled.

  4. modified the milestones: , on Nov 26, 2014
  5. fariza commented on Aug 7, 2015

    @fariza
    Member

    I just checked and it has been solved. Please reopen if problem persist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions