From dc985f7750317d4265e675ec7b7c001fee3b2e32 Mon Sep 17 00:00:00 2001 From: Numerlor Date: Sat, 10 Aug 2019 12:06:52 +0200 Subject: [PATCH] cast last route index to int before sending over --- main_windows.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main_windows.py b/main_windows.py index da332bad..65123d46 100644 --- a/main_windows.py +++ b/main_windows.py @@ -653,13 +653,15 @@ def last_submit_act(self): self.status.showMessage("No last route found") self.last_submit.setEnabled(True) else: - if last_route[0] == len(last_route[1]): + index = int(last_route[0]) + route = last_route[1] + if index == route: self.data_signal.emit(self.journals[self.last_comb.currentIndex()], - last_route[1], 1) + route, 1) self.close() else: self.data_signal.emit(self.journals[self.last_comb.currentIndex()], - last_route[1], last_route[0]) + route, index) self.close() def show_nearest(self):