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/image2target: fix showing Ground Control Points settings dialog #3189

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Sep 25, 2023

Describe the bug
Showing Map Georectifier and Ground Control Points manager for 3D correction tool settings dialog fails and prints an error message.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Map Georectifier and Ground Control Points manager for 3D correction tool window g.gui.image2target
  2. From the Select source location combobox widget choose nc_spm_08_grass7 location
  3. From the Select source mapset combobox widget choose landsat mapset
  4. Hit Next > button widget
  5. On the next wizard Select image/map group to georectify page choose from the Select group combobox widget lsat7_2000 group
  6. On the next wizard Select maps to display for GCP creation page from the Select source map to display combobox widget choose lsat7_2000_10@landsat map
  7. Hit Finish button widget
  8. Try open Settings dialog from the main toolbar
  9. See error
Traceback (most recent call last):
  File "/usr/lib64/grass84/gui/wxpython/image2target/ii2t_manager.py", line 1869, in OnSettings
    dlg = GrSettingsDialog(
  File "/usr/lib64/grass84/gui/wxpython/image2target/ii2t_manager.py", line 2895, in __init__
    self.__CreateSymbologyPage(notebook)
  File "/usr/lib64/grass84/gui/wxpython/image2target/ii2t_manager.py", line 3115, in __CreateSymbologyPage
    sizer.Add(
wx._core.wxAssertionError: C++ assertion "CheckSizerFlags(!((flags) & (wxALIGN_CENTRE_VERTICAL)))" failed at /var/tmp/portage/x11-libs/wxGTK-3.2.2.1-r2/work/wxWidgets-3.2.2.1/src/common/sizer.cpp(2258) in DoInsert(): wxALIGN_CENTRE_VERTICAL will be ignored in this sizer: only horizontal alignment flags can be used in vertical sizers

DO NOT PANIC !!

If you're an end user running a program not developed by you, please ignore this message, it is harmless, and please try reporting the problem to the program developers.

You may also set WXSUPPRESS_SIZER_FLAGS_CHECK environment variable to suppress all such checks when running this program.

If you're the developer, simply remove this flag from your code to avoid getting this message. You can also call wxSizerFlags::DisableConsistencyChecks() to globally disable all such checks, but this is strongly not recommended.

Expected behavior
Showing Map Georectifier and Ground Control Points manager for 3D correction tool settings dialog should work and not printing an error message.

System description:

  • Operating System: all
  • GRASS GIS version: all
GRASS nc_spm_08_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
Only horizontal alignment flags can be used in vertical sizers.

Remove vertical sizer Add() method flags parameter argument
wx.ALIGN_CENTER_VERTICAL flag. Only horizontal alignment flags can be
used in vertical sizers.
@tmszi tmszi added bug Something isn't working GUI wxGUI related backport to 8.3 labels Sep 25, 2023
@tmszi tmszi added this to the 8.3.1 milestone Sep 25, 2023
@tmszi tmszi merged commit 1f49355 into OSGeo:main Sep 26, 2023
18 checks passed
tmszi added a commit to tmszi/grass that referenced this pull request Sep 26, 2023
…OSGeo#3189)

Remove vertical sizer Add() method flags parameter argument
wx.ALIGN_CENTER_VERTICAL flag. Only horizontal alignment flags can be
used in vertical sizers.
tmszi added a commit to tmszi/grass that referenced this pull request Sep 26, 2023
…OSGeo#3189)

Remove vertical sizer Add() method flags parameter argument
wx.ALIGN_CENTER_VERTICAL flag. Only horizontal alignment flags can be
used in vertical sizers.
@tmszi tmszi deleted the wxgui-image2target-fix-vertical-boxsizer-widget-add-widget-flags branch September 26, 2023 11:51
landam pushed a commit to landam/grass that referenced this pull request Oct 25, 2023
…OSGeo#3189)

Remove vertical sizer Add() method flags parameter argument
wx.ALIGN_CENTER_VERTICAL flag. Only horizontal alignment flags can be
used in vertical sizers.
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
…OSGeo#3189)

Remove vertical sizer Add() method flags parameter argument
wx.ALIGN_CENTER_VERTICAL flag. Only horizontal alignment flags can be
used in vertical sizers.
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
…OSGeo#3189)

Remove vertical sizer Add() method flags parameter argument
wx.ALIGN_CENTER_VERTICAL flag. Only horizontal alignment flags can be
used in vertical sizers.
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