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/psmap: fix vector line map props dialog PenStyleComboBox widget drawing items #3162

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Sep 17, 2023

Describe the bug
Vector line map props dialog Choose line style (PenStyleComboBox() class) widget doesn't drawing items correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Cartographic Composer g.gui.psmap
  2. Add map frame (via activating map frame tool from main toolbar), choose vector line map e.g. streams and hit Ok button (important is choose vector line map)
  3. Double left mouse click on the square map frame to opening map frame dialog and switch to Vector maps page (tab)
  4. On the Vector maps page (tab) hit Properties button to opening vector line e.g. streams map props dialog
  5. On the vector line e.g. streams map props dialog switch to Size and style page (tab)
  6. On Size and style page (tab) try to change line style (Choose line style widget)
  7. See error
TypeError: DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 3 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'int'

Expected behavior
Vector line map props dialog Choose line style (PenStyleComboBox() class) widget should draw items correctly.

Screenshots

Default behavior:

default behavior

Expected behavior:

expected behavior

System description:

  • Operating System: GNU/Linux
  • GRASS GIS version: all
GRASS nc_basic_spm_grass7/PERMANENT:~ > 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

Additional context
Device context DrawTex() and DrawLine() method require input x, y parameter argument type as integer type.

Method doc:

https://docs.wxpython.org/wx.DC.html#wx.DC.DrawText
https://docs.wxpython.org/wx.DC.html#wx.DC.DrawLine

… drawing items

Device context DrawTex() and DrawLine() method require input x, y
parameter argument type as integer type.
@tmszi tmszi added bug Something isn't working GUI wxGUI related backport to 8.3 labels Sep 17, 2023
@tmszi tmszi added this to the 8.3.1 milestone Sep 17, 2023
@tmszi tmszi merged commit d5db3ce into OSGeo:main Sep 19, 2023
tmszi added a commit to tmszi/grass that referenced this pull request Sep 19, 2023
… drawing items (OSGeo#3162)

Device context DrawTex() and DrawLine() method require input x, y
parameter argument type as integer type.
tmszi added a commit to tmszi/grass that referenced this pull request Sep 19, 2023
… drawing items (OSGeo#3162)

Device context DrawTex() and DrawLine() method require input x, y
parameter argument type as integer type.
@tmszi tmszi deleted the wxgui-psmap-fix-vect-props-dialog-pen-style-combobox-widget-drawing-items branch September 19, 2023 03:48
landam pushed a commit to landam/grass that referenced this pull request Oct 25, 2023
… drawing items (OSGeo#3162)

Device context DrawTex() and DrawLine() method require input x, y
parameter argument type as integer type.
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
… drawing items (OSGeo#3162)

Device context DrawTex() and DrawLine() method require input x, y
parameter argument type as integer type.
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
… drawing items (OSGeo#3162)

Device context DrawTex() and DrawLine() method require input x, y
parameter argument type as integer type.
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