Fix for system blob not disappearing on new game

This commit is contained in:
Jonathan Harris committed 2017-04-28 13:38:44 +01:00
1 parent 5ee541ae68
commit f95e00b0c3
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -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()
+1 -1
View File
@@ -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 }