electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0294844c11a4da2b30faba26d4649c2aae24860f
parent 258b5040003c62b57cad8c46843fb31195ddf4b8
Author: SomberNight <somber.night@protonmail.com>
Date:   Sat,  8 Dec 2018 06:56:18 +0100

labels plugin qt: only update corresponding window; disconnect signal

Diffstat:
Melectrum/gui/qt/main_window.py | 6+++++-
Melectrum/plugins/labels/qt.py | 4++++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.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(): 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() diff --git a/electrum/plugins/labels/qt.py b/electrum/plugins/labels/qt.py @@ -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)