From 98ba85cb150e07b5532cdb4914a60d7d89b8f62b Mon Sep 17 00:00:00 2001 From: Santi871 Date: Sat, 15 Jun 2019 03:40:25 -0300 Subject: [PATCH] fixed waypoint selection and removing not working --- src/gui.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui.py b/src/gui.py index 790476c..c7a908c 100644 --- a/src/gui.py +++ b/src/gui.py @@ -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: @@ -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() @@ -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)