Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/vselect: fix BoxSizer widget Add method proportion param arg type #2984

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented May 26, 2023

Describe the bug
Activating wxGUI Select vector feature(s) tool fails.

To Reproduce
Steps to reproduce the behavior:

  1. Launch wxGUI
  2. Display some vector map d.vect geology
  3. Try to activate wxGUI Select vector feature(s) tool
  4. See error
Traceback (most recent call last):
  File "/usr/lib64/grass82/gui/wxpython/mapdisp/frame.py",
line 704, in OnSelect

self.dialogs["vselect"].CreateDialog(createButton=True)
  File
"/usr/lib64/grass82/gui/wxpython/gui_core/vselect.py", line
135, in CreateDialog

self._dialog.AddWidget(createMap, proportion=0.1)
  File
"/usr/lib64/grass82/gui/wxpython/gui_core/vselect.py", line
83, in AddWidget

self.mainSizer.Add(widget, proportion=proportion, flag=flag)
TypeError
:
Sizer.Add(): arguments did not match any overloaded call:
  overload 1: 'proportion' is not a valid keyword argument
  overload 2: argument 'proportion' has unexpected type
'float'
  overload 3: argument 1 has unexpected type 'Button'
  overload 4: argument 1 has unexpected type 'Button'
  overload 5: argument 1 has unexpected type 'Button'
  overload 6: argument 1 has unexpected type 'Button'
  overload 7: argument 1 has unexpected type 'Button'
  overload 8: argument 1 has unexpected type 'Button'
  overload 9: argument 1 has unexpected type 'Button'

Expected behavior
Activating wxGUI Select vector feature(s) tool should work without error message.

System description:

  • Operating System: all
  • GRASS GIS version: all

Python 3.10.11
wxPython 4.2.0

Fixed #2982.

BoxSizer widget Add method proportion param arg type must be integer
type. Fix is for Python 3.10 and wxPython 4.2.0 version.
@tmszi tmszi added bug Something isn't working backport_needed GUI wxGUI related labels May 26, 2023
@tmszi tmszi added this to the 8.3.0 milestone May 26, 2023
@tmszi tmszi requested a review from petrasovaa May 26, 2023 09:38
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.

Thanks!

@tmszi tmszi merged commit 8f6f1ec into OSGeo:main May 30, 2023
tmszi added a commit to tmszi/grass that referenced this pull request May 30, 2023
…pe (OSGeo#2984)

BoxSizer widget Add method proportion param arg type must be integer
type. Fix is for Python 3.10 and wxPython 4.2.0 version.
tmszi added a commit to tmszi/grass that referenced this pull request May 30, 2023
…pe (OSGeo#2984)

BoxSizer widget Add method proportion param arg type must be integer
type. Fix is for Python 3.10 and wxPython 4.2.0 version.
tmszi added a commit to tmszi/grass that referenced this pull request May 30, 2023
…pe (OSGeo#2984)

BoxSizer widget Add method proportion param arg type must be integer
type. Fix is for Python 3.10 and wxPython 4.2.0 version.
@tmszi tmszi deleted the fix-wxgui-vselect-boxsizer-add-method-proportion-param-arg-type branch May 30, 2023 06:33
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
…pe (OSGeo#2984)

BoxSizer widget Add method proportion param arg type must be integer
type. Fix is for Python 3.10 and wxPython 4.2.0 version.
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.

[Bug] GUI select tool generates error, does not select, and window won't close
2 participants