Skip to content

Commit

Permalink
mavproxy_kmlread: correct initial checking of checkbox polygon items
Browse files Browse the repository at this point in the history
the addition of the counter for the layer name broke the population of the "current layers" list
  • Loading branch information
peterbarker committed May 15, 2024
1 parent a16dcb2 commit 905d71d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MAVProxy/modules/mavproxy_kmlread.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,17 @@ def loadkml(self, filename):

# print("Adding " + point[1])
newcolour = (random.randint(0, 255), 0, random.randint(0, 255))
layer_name = point[1]+"-"+str(counter)
curpoly = mp_slipmap.SlipPolygon(
point[1]+"-"+str(counter),
layer_name,
point[2],
layer=2,
linewidth=2,
colour=newcolour,
)
self.mpstate.map.add_object(curpoly)
self.allayers.append(curpoly)
self.curlayers.append(point[1])
self.curlayers.append(layer_name)

# and points - barrell image and text
if self.mpstate.map is not None and point[0] == 'Point':
Expand Down

0 comments on commit 905d71d

Please sign in to comment.