mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
labels plugin qt: only update corresponding window; disconnect signal
This commit is contained in:
parent
258b504000
commit
0294844c11
2 changed files with 9 additions and 1 deletions
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue