Describe the bug
An error message is printed during docking undocked 3D view window.
To reproduce
- Launch wxGUI
- Display some raster elevation map
d.rast elevation
- Switch 2D view to the 3D view
- Hit (Un)dock (undocking) button from the map display toolbar
- Hit (Un)dock (docking) button from the map display toolbar window
- See error message
Traceback (most recent call last):
File "/usr/lib64/grass86/gui/wxpython/nviz/mapwindow.py",
line 441, in OnSize
self.SetCurrent(self.context)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
wx._core.wxAssertionError: C++ assertion ""xid"" failed at /
var/tmp/portage/x11-libs/wxGTK-3.2.8.1-r2/work/wxWidgets-
3.2.8.1/src/unix/glx11.cpp(584) in SetCurrent(): window must
be shown
Expected behavior
No error message should be printed during docking undocked 3D view window.
System description
- Operating System: all
- GRASS version: 8.6.0dev, 8.5.0
Additional context
According my debug info, during docking undocked 3D view window is called
|
self.AddPage(page, frame.GetTitle()) |
which trigger
wx.EVT_SIZE event with
OnSize() method handler (problematic is code line no. 428)
|
def OnSize(self, event): |
|
size = self.GetClientSize() |
|
context = self.context if CheckWxVersion(version=[2, 9]) else self.GetContext() |
|
if self.size != size and context: |
|
Debug.msg( |
|
3, "GLCanvas.OnSize(): w = %d, h = %d" % (size.width, size.height) |
|
) |
|
if CheckWxVersion(version=[2, 9]): |
|
self.SetCurrent(self.context) |
before the window is displayed.
Describe the bug
An error message is printed during docking undocked 3D view window.
To reproduce
d.rast elevationExpected behavior
No error message should be printed during docking undocked 3D view window.
System description
Additional context
According my debug info, during docking undocked 3D view window is called
grass/gui/wxpython/main_window/notebook.py
Line 143 in c2ccb36
wx.EVT_SIZEevent withOnSize()method handler (problematic is code line no. 428)grass/gui/wxpython/nviz/mapwindow.py
Lines 420 to 428 in c2ccb36