Fixed exception on empty event + exception when plotter is hidden

This commit is contained in:
CMDR-Kiel42 2019-07-18 20:07:32 +02:00
parent 40ad5e6a69
commit 3b564149d3
2 changed files with 6 additions and 7 deletions

View File

@ -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:

View File

@ -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()