URI: 
       tlabels plugin qt: only update corresponding window; disconnect signal - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 0294844c11a4da2b30faba26d4649c2aae24860f
   DIR parent 258b5040003c62b57cad8c46843fb31195ddf4b8
  HTML 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:
         M electrum/gui/qt/main_window.py      |       6 +++++-
         M electrum/plugins/labels/qt.py       |       4 ++++
       
       2 files changed, 9 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
       t@@ -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()
   DIR diff --git a/electrum/plugins/labels/qt.py b/electrum/plugins/labels/qt.py
       t@@ -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)