Skip to content

Conversation

@tmszi
Copy link
Member

@tmszi tmszi commented Sep 22, 2023

Describe the bug
Supervised Classification Tool scatter plots pane prints error message when closed.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Supervised Classification Tool wxGUI g.gui.iclass
  2. On the left Plots pane combobox widget choose Scatter plots item
  3. On the Scatter plots toolbar activate Add scatter plot tool
  4. On the Select imagery group dialog from the name of imagery group listbox widget items choose lsat7_2000
  5. Hit Create/edit group... button widget
  6. On the Create or edit image group dialog, type into Select existing subgroup or enter name of new subgroup combobox widget new subgroup name e.g. test and select some maps from the list to be part of the new cretaed subgroup test (lsat7_2000_10, lsat7_2000_20, lsat7_2000_30, lsat7_2000_40) and hit OK button
  7. Hit OK button on the Create or edit image group dialog
  8. On the next Add scatter plots dialog choose from the x axis combobox widget items lsat7_2000_10 raster map, and from the y axis combobox widget items choose lsat7_2000_20 raster map and hit Add button
  9. Repeat point 9. but with another maps, from the x axis combobox widget items choose lsat7_2000_30 raster map, and from the y axis combobox widget items choose lsat7_2000_40 raster map and hit Add button
  10. On the Add scatter plots dialog hit OK button
  11. Try to close scatter plot pane via x button
  12. See error
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/wx/lib/agw/aui/framemanager.py", line 8448, in OnRender
    art.DrawCaption(dc, self._frame, part.pane.caption, part.rect, part.pane)
  File "/usr/lib/python3.10/site-packages/wx/lib/agw/aui/dockart.py", line 593, in DrawCaption
    btns = pane.CountButtons()
  File "/usr/lib/python3.10/site-packages/wx/lib/agw/aui/framemanager.py", line 1715, in CountButtons
    if isinstance(wx.GetTopLevelParent(self.window), AuiFloatingFrame):
RuntimeError: wrapped C/C++ object of type ScatterPlotWidget has been deleted

Expected behavior
Supervised Classification Tool scatter plots pane should not prints error message when closed.

System description:

  • Operating System: all
  • GRASS GIS version: all
GRASS nc_spm_08_grass7/landsat:~ > python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.10.13 (main, Sep 16 2023, 22:24:59) [GCC 12.3.1 20230526]
4.2.0 gtk3 (phoenix) wxWidgets 3.2.2.1

@tmszi tmszi added bug Something isn't working GUI wxGUI related backport to 8.3 labels Sep 22, 2023
@tmszi tmszi added this to the 8.3.1 milestone Sep 22, 2023
@tmszi tmszi merged commit a9221cc into OSGeo:main Sep 26, 2023
tmszi added a commit to tmszi/grass that referenced this pull request Sep 26, 2023
tmszi added a commit to tmszi/grass that referenced this pull request Sep 26, 2023
@tmszi tmszi deleted the wxgui-iclass-fix-close-scatter-plot-pane branch September 26, 2023 11:55
landam pushed a commit to landam/grass that referenced this pull request Oct 25, 2023
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working GUI wxGUI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants