1
0

A different approach to d5aa646

Only clean up the MainWindow once.
This commit is contained in:
Neil Booth
2016-01-12 20:19:21 +09:00
parent 58fe42cea2
commit f7b39f4952
2 changed files with 14 additions and 9 deletions

View File

@@ -163,16 +163,13 @@ class ElectrumGui:
return w
def close_window(self, window):
# It seems that in some cases this can be called before the
# window is added to the windows list...
if window in self.windows:
self.windows.remove(window)
run_hook('on_close_window', window)
self.windows.remove(window)
self.build_tray_menu()
# save wallet path of last open window
if self.config.get('wallet_path') is None and not self.windows:
path = window.wallet.storage.path
self.config.set_key('gui_last_wallet', path)
run_hook('on_close_window', window)
def main(self):
self.timer.start()