Skip to content

Comments

wxGUI/iclass: fix activating scatter plot pane toolbar tools#3182

Merged
tmszi merged 2 commits intoOSGeo:mainfrom
tmszi:wxgui-iclass-fix-activating-scatter-plots-tools
Sep 27, 2023
Merged

wxGUI/iclass: fix activating scatter plot pane toolbar tools#3182
tmszi merged 2 commits intoOSGeo:mainfrom
tmszi:wxgui-iclass-fix-activating-scatter-plots-tools

Conversation

@tmszi
Copy link
Member

@tmszi tmszi commented Sep 23, 2023

Describe the bug
Activating Supervised Classification Tool window scatter plots pane toolbar tools prints an error message.

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 activate some scatter plots toolbar tools e.g. Pan mode
  12. See error
Traceback (most recent call last):
  File "/usr/lib64/grass84/gui/wxpython/iscatt/toolbars.py", line 82, in <lambda>
    lambda event: self.SetPloltsMode(event, "pan"),
  File "/usr/lib64/grass84/gui/wxpython/iscatt/toolbars.py", line 141, in SetPloltsMode
    i_tool_id = vars(self)[i_tool_name]
KeyError: ('add_scatt', 'Add scatter plot')

Expected behavior
Activating Supervised Classification Tool window scatter plots pane toolbar tools should working without prints an error message.

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 23, 2023
@tmszi tmszi added this to the 8.3.1 milestone Sep 23, 2023
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be simpler to just create a new standalone function, than the mixin, no? Or is there a specific reason?

@tmszi
Copy link
Member Author

tmszi commented Sep 26, 2023

I think it would be simpler to just create a new standalone function, than the mixin, no? Or is there a specific reason?

Yes you are right, simple standalone func is enough.

@tmszi tmszi merged commit 97f5195 into OSGeo:main Sep 27, 2023
tmszi added a commit to tmszi/grass that referenced this pull request Sep 27, 2023
tmszi added a commit to tmszi/grass that referenced this pull request Sep 27, 2023
@tmszi tmszi deleted the wxgui-iclass-fix-activating-scatter-plots-tools branch September 27, 2023 10:45
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