Skip to content

Commit

Permalink
kmlread: factor out skipping of -text items
Browse files Browse the repository at this point in the history
... I'm not sure what these are or why we are skipping them, but simplify things
  • Loading branch information
peterbarker committed May 10, 2024
1 parent d2649d5 commit a25e8f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MAVProxy/modules/mavproxy_kmlread.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,17 @@ def idle_task(self):
# then add all the layers to the menu, ensuring to
# check the active layers text elements aren't
# included on the menu
if layer.key in self.curlayers and layer.key[-5:] != "-text":
if layer.key.endswith('-text'):
continue

if layer.key in self.curlayers:
self.menu.items.append(MPMenuCheckbox(
layer.key,
layer.key,
'# kml toggle \"' + layer.key + '\"',
checked=True,
))
elif layer.key[-5:] != "-text":
else:
self.menu.items.append(MPMenuCheckbox(
layer.key,
layer.key,
Expand Down

0 comments on commit a25e8f8

Please sign in to comment.