diff --git a/AutoCompleter.py b/AutoCompleter.py index 0351f75..f299c9e 100755 --- a/AutoCompleter.py +++ b/AutoCompleter.py @@ -101,8 +101,10 @@ class AutoCompleter(Entry, PlaceHolder): def show_list(self, height): self.lb["height"] = height if not self.lb_up: - self.lb.grid(row=self.grid_info()["row"]+1, columnspan=2) - self.lb_up = True + info = self.grid_info() + if info: + self.lb.grid(row=info["row"]+1, columnspan=2) + self.lb_up = True def hide_list(self): if self.lb_up: diff --git a/load.py b/load.py index a013963..cdf5dc6 100644 --- a/load.py +++ b/load.py @@ -306,14 +306,11 @@ def update_route(direction=1): copy_waypoint(this.parent) def journal_entry(cmdr, is_beta, system, station, entry, state): - if entry["StarSystem"]: + if (entry['event'] in ['FSDJump', 'Location', 'SupercruiseEntry', 'SupercruiseExit']) and entry["StarSystem"] == this.next_stop: + update_route() this.source_ac.delete(0, tk.END) this.source_ac.insert(0, entry["StarSystem"]) this.source_ac["fg"] = this.source_ac.default_fg_color - if (entry['event'] == 'FSDJump' or entry['event'] == 'Location') and entry["StarSystem"] == this.next_stop: - update_route() - elif entry['event'] in ['SupercruiseEntry', 'SupercruiseExit'] and entry['StarSystem'] == this.next_stop: - update_route() elif entry['event'] == 'FSSDiscoveryScan' and entry['SystemName'] == this.next_stop: update_route()