From f95e00b0c36e0b2d941fa0175fd51eb4b9b364a8 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Fri, 28 Apr 2017 13:38:16 +0100 Subject: [PATCH] Fix for system blob not disappearing on new game --- EDMarketConnector.py | 5 ++--- edsm.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index e41d0482..3a6213e3 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -587,9 +587,8 @@ class AppWindow: self.station['text'] = monitor.station or (EDDB.system(monitor.system) and self.STATION_UNDOCKED or '') if self.system['text'] != monitor.system: self.system['text'] = monitor.system or '' - self.system['image'] = '' - if monitor.system: - self.edsm.link(monitor.system) + self.edsm.link(monitor.system) + self.edsmpoll() if entry['event'] in ['Undocked', 'StartJump', 'SetUserShipName', 'ShipyardBuy', 'ShipyardSell', 'ShipyardSwap', 'ModuleBuy', 'ModuleSell', 'MaterialCollected', 'MaterialDiscarded', 'ScientificResearch', 'EngineerCraft', 'Synthesis']: self.status['text'] = '' # Periodically clear any old error self.w.update_idletasks() diff --git a/edsm.py b/edsm.py index 91f2e461..cddd71d8 100644 --- a/edsm.py +++ b/edsm.py @@ -107,7 +107,7 @@ class EDSM: # Just set link without doing a lookup def link(self, system_name): self.cancel_lookup() - if system_name in self.FAKE: + if not system_name or system_name in self.FAKE: self.result = { 'img': '', 'url': None, 'done': True, 'uncharted': False } else: self.result = { 'img': '', 'url': 'https://www.edsm.net/show-system?systemName=%s' % urllib2.quote(system_name), 'done': True, 'uncharted': False }