labels plugin qt: only update corresponding window; disconnect signal

This commit is contained in:
SomberNight 2018-12-08 06:56:18 +01:00
parent 258b504000
commit 0294844c11
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
2 changed files with 9 additions and 1 deletions

View file

@ -794,7 +794,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if self.wallet.up_to_date or not self.network or not self.network.is_connected():
self.update_tabs()
def update_tabs(self):
def update_tabs(self, wallet=None):
if wallet is None:
wallet = self.wallet
if wallet != self.wallet:
return
self.history_list.update()
self.request_list.update()
self.address_list.update()

View file

@ -75,4 +75,8 @@ class Plugin(LabelsPlugin):
@hook
def on_close_window(self, window):
try:
self.obj.labels_changed_signal.disconnect(window.update_tabs)
except TypeError:
pass # 'method' object is not connected
self.stop_wallet(window.wallet)