Skip to content

Commit

Permalink
wxGUI/lmgr: fix launch GCP Manager if not map display is activated (O…
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Jul 16, 2022
1 parent f120a69 commit cedbf77
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gui/wxpython/lmgr/giface.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ def __len__(self):

def __iter__(self):
"""Iterates over the contents of the list."""
item = self._tree.GetFirstChild(self._tree.root)[0]
while item and item.IsOk():
yield Layer(item, self._tree.GetPyData(item))
item = self._tree.GetNextItem(item)
if self._tree:
item = self._tree.GetFirstChild(self._tree.root)[0]
while item and item.IsOk():
yield Layer(item, self._tree.GetPyData(item))
item = self._tree.GetNextItem(item)

def __getitem__(self, index):
"""Select a layer from the LayerList using the index."""
Expand Down

0 comments on commit cedbf77

Please sign in to comment.