Hello everyone,

I'm building and application which will display a collection 
of several wxpanels each of which displays a 
FigureCanvasWxAgg with a particular subplot.
The user is allowed to remove these panels.
However, after a panel is deleted (call wxPanel.Destroy()), 
and the mouse moves over the now empty space, I get the 
following exception:
   File 
"/usr/lib/pymodules/python2.6/matplotlib/backends/backend_wx.py", 
line 1316, in _onMotion
     FigureCanvasBase.motion_notify_event(self, x, y, 
guiEvent=evt)
   File 
"/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", 
line 1244, in motion_notify_event
     guiEvent=guiEvent)
   File 
"/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", 
line 899, in __init__
     LocationEvent.__init__(self, name, canvas, x, y, 
guiEvent=guiEvent)
   File 
"/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", 
line 817, in __init__
     self._update_enter_leave()
   File 
"/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", 
line 844, in _update_enter_leave
     last.canvas.callbacks.process('axes_leave_event', last)
   File 
"/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", 
line 14586, in __getattr__
     raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the 
FigureCanvasWxAgg object has been deleted, attribute access 
no longer allowed.

Looks like the deleted canvas is still listening for mouse 
move events.
How can I prevent this?

Thank you,
Sandy

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to