Skip to content

Commit

Permalink
fixed waypoint selection and removing not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Santi871 committed Jun 15, 2019
1 parent db39afa commit 98ba85c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def add_waypoint(self, position, elevation, name=None):
wpadded = True

elif self.values["WP"]:
sequence = int(self.values["sequence"])
sequence = self.values["sequence"]
if sequence == "None":
sequence = 0
else:
Expand Down Expand Up @@ -566,7 +566,7 @@ def run(self):
i, = re.search("(\\d)+", valuestr).group(0)
self.profile.waypoints.get("WP", list()).pop(int(i)-1)
else:
i, station = re.findall("(\\d)+", valuestr)
i, station = re.findall("(\\d)+", valuestr)[:2]
self.profile.waypoints.get("MSN", list())[int(station)].pop(int(i)-1)

self.update_waypoints_list()
Expand All @@ -580,7 +580,7 @@ def run(self):
mission = self.profile.waypoints["WP"][int(i) - 1]

else:
i, station = re.findall("(\\d)+", valuestr)
i, station = re.findall("(\\d)+", valuestr)[:2]
mission = self.profile.waypoints["MSN"][int(station)][int(i) - 1]

self.update_position(mission.position, mission.elevation, mission.name)
Expand Down

0 comments on commit 98ba85c

Please sign in to comment.