#1425: error in python _core.py from wxNVIZ
---------------------------+------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: mouse, wxNVIZ | Platform: Unspecified
Cpu: Unspecified |
---------------------------+------------------------------------------------
The following code raises an error when a mouse click is registered in
wxNVIZ
Traceback (most recent call last):
File "/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/nviz_mapdisp.py",
line 341, in OnMouseAction
self.OnLeftUp(event)
File "/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/nviz_mapdisp.py",
line 475, in OnLeftUp
self.ReleaseMouse()
File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/python/wx/_core.py", line 9744,
in ReleaseMouse
return _core_.Window_ReleaseMouse(*args, **kwargs)
wx._core
.
PyAssertionError
:
C++ assertion "GetCapture() == this" failed at /BUILD
/wxPython-src-2.8.12.0/src/common/wincmn.cpp(2536) in
ReleaseMouse(): attempt to release mouse, but this window
hasn't captured it
#1425: error in python _core.py from wxNVIZ
---------------------------+------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: mouse, wxNVIZ | Platform: Unspecified
Cpu: Unspecified |
---------------------------+------------------------------------------------
Comment(by annakrat):
Hi Michael,
how can I reproduce this error?
I'm not sure I understand the problem but try to remove the first line in
GLWindow.OnLeftUp:
{{{
self.ReleaseMouse()
}}}
or use:
{{{
if self.HasCapture():
self.ReleaseMouse()
}}}
#1425: error in python _core.py from wxNVIZ
---------------------------+------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: mouse, wxNVIZ | Platform: Unspecified
Cpu: Unspecified |
---------------------------+------------------------------------------------
Comment(by cmbarton):
Unfortunately I'm still getting the same error. The error might be
somewhat bogus, because it is not clear that any functionality is
affected. Maybe the offending line can simply be commented out.
#1425: error in python _core.py from wxNVIZ
---------------------------+------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: mouse, wxNVIZ | Platform: Unspecified
Cpu: Unspecified |
---------------------------+------------------------------------------------
Comment(by cmbarton):
Some testing results.
self.ReleaseMouse() is needed in order to be able to place a north arrow
or scale bar with the mouse. Why is this? I inserted a self.HasCapture()
command to test whether or not the window is somehow capturing the mouse,
but it is not.
The ReleaseMouse() command is to release the mouse following the
CaptureMouse(). But I cannot see that the CaptureMouse() command has been
issued anywhere. This is why ReleaseMouse() raises an error in the
OnLeftUp mouse button handler.
What is not at all clear is what ReleaseMouse() is doing to make the north
arrow and scalebar placement possible. Any thoughts on this?