Skip to content

Comments

wxGUI/psmap: fix showing image map element preview#3193

Merged
tmszi merged 1 commit intoOSGeo:mainfrom
tmszi:wxgui-psmap-fix-added-image-map-element-preview
Sep 27, 2023
Merged

wxGUI/psmap: fix showing image map element preview#3193
tmszi merged 1 commit intoOSGeo:mainfrom
tmszi:wxgui-psmap-fix-added-image-map-element-preview

Conversation

@tmszi
Copy link
Member

@tmszi tmszi commented Sep 27, 2023

Describe the bug
Map image element doesn't show preview on the Image settings dialog for adding map image element.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Cartographic Composer g.gui.psmap
  2. From the main toolbar activate Add map elements tool and choose Image
  3. On the Image settings dialog select the directory where the EPS images are stored
  4. Choose image from list of loaded images
  5. See error
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/wx/lib/filebrowsebutton.py", line 140, in OnChanged
    self.changeCallback(evt)
  File "/usr/lib64/grass84/gui/wxpython/psmap/dialogs.py", line 5908, in OnDirChanged
    self.OnImageSelectionChanged(None)
  File "/usr/lib64/grass84/gui/wxpython/psmap/dialogs.py", line 5958, in OnImageSelectionChanged
    img = self.ScaleToPreview(img)
  File "/usr/lib64/grass84/gui/wxpython/psmap/dialogs.py", line 5978, in ScaleToPreview
    return img.Scale(newW, newH, wx.IMAGE_QUALITY_HIGH)
TypeError: Image.Scale(): argument 2 has unexpected type 'float

Expected behavior
Map image element should show preview on the Image settings dialog for adding map image element.

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 27, 2023
@tmszi tmszi added this to the 8.3.1 milestone Sep 27, 2023
@tmszi tmszi merged commit 3462e8d 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-psmap-fix-added-image-map-element-preview branch September 27, 2023 10:43
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.

1 participant