Browse Source
labels plugin qt: only update corresponding window; disconnect signal
3.3.3.1
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
9 additions and
1 deletions
-
electrum/gui/qt/main_window.py
-
electrum/plugins/labels/qt.py
|
@ -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(): |
|
|
if self.wallet.up_to_date or not self.network or not self.network.is_connected(): |
|
|
self.update_tabs() |
|
|
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.history_list.update() |
|
|
self.request_list.update() |
|
|
self.request_list.update() |
|
|
self.address_list.update() |
|
|
self.address_list.update() |
|
|
|
@ -75,4 +75,8 @@ class Plugin(LabelsPlugin): |
|
|
|
|
|
|
|
|
@hook |
|
|
@hook |
|
|
def on_close_window(self, window): |
|
|
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) |
|
|
self.stop_wallet(window.wallet) |
|
|