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/lmgr: fix launch GCP Manager if not map display is activated #2464

Merged
merged 1 commit into from
Jul 16, 2022

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Jun 24, 2022

Describe the bug
When no map display is activated GCP Manager doesn't launch.

To Reproduce
Steps to reproduce the behavior:

  1. Launch wxGUI
  2. Close all activated map display
  3. From the main wxGUI window toolbar launch GCP Manager
  4. See error
Traceback (most recent call last):
  File "/usr/lib64/grass83/gui/wxpython/lmgr/frame.py", line
737, in OnGCPManager

GCPWizard(self, self._giface)
  File "/usr/lib64/grass83/gui/wxpython/gcp/manager.py",
line 164, in __init__

self.mappage = DispMapPage(self.wizard, self)
  File "/usr/lib64/grass83/gui/wxpython/gcp/manager.py",
line 833, in __init__

extraItems=self.GetSelectTargetRasterExtraItems(),
  File "/usr/lib64/grass83/gui/wxpython/gcp/manager.py",
line 1037, in GetSelectTargetRasterExtraItems

return {self.web_servc_lyrs_root_node_name:
self.GetWebServiceLayers().keys()}
  File "/usr/lib64/grass83/gui/wxpython/gcp/manager.py",
line 1028, in GetWebServiceLayers

for layer in self.parent._giface.GetLayerList():
  File "/usr/lib64/grass83/gui/wxpython/lmgr/giface.py",
line 64, in __iter__

item = self._tree.GetFirstChild(self._tree.root)[0]
AttributeError
:
'NoneType' object has no attribute 'GetFirstChild'

Expected behavior
When no map display is activated GCP Manager should be launch without error.

System description (please complete the following information):

  • Operating System: all
  • GRASS GIS version: all

@tmszi tmszi added bug Something isn't working backport_needed GUI wxGUI related labels Jun 24, 2022
@tmszi tmszi added this to the 8.2.1 milestone Jun 24, 2022
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 b59dca8 into OSGeo:main Jul 16, 2022
@tmszi tmszi deleted the wxgui_fix_launch_gcp_if_no_map_disp branch July 16, 2022 16:17
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.

None yet

2 participants