From 0294844c11a4da2b30faba26d4649c2aae24860f Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 8 Dec 2018 06:56:18 +0100 Subject: [PATCH] labels plugin qt: only update corresponding window; disconnect signal --- electrum/gui/qt/main_window.py | 6 +++++- electrum/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 index 6e0210510..d34f6f95a 100644 --- 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 index 2a66d98eb..d834b7a3b 100644 --- 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)