URI: 
       twrap list updates in setUpdatesEnabled() - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit cd65516ff035a7af57d9c557bfc7f06567fd9dea
   DIR parent 1e24dbd94b9d1c1cf4f2b2e8647faff9cbf76abd
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Wed,  4 Jan 2017 18:22:15 +0100
       
       wrap list updates in setUpdatesEnabled()
       
       Diffstat:
         M gui/qt/history_list.py              |       5 ++---
         M gui/qt/util.py                      |       2 ++
       
       2 files changed, 4 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/gui/qt/history_list.py b/gui/qt/history_list.py
       t@@ -30,7 +30,7 @@ from util import *
        from electrum.i18n import _
        from electrum.util import block_explorer_URL, format_satoshis, format_time
        from electrum.plugins import run_hook
       -from electrum.util import timestamp_to_datetime
       +from electrum.util import timestamp_to_datetime, profiler
        
        
        TX_ICONS = [
       t@@ -66,16 +66,15 @@ class HistoryList(MyTreeWidget):
                '''Replaced in address_dialog.py'''
                return self.wallet.get_addresses()
        
       +    @profiler
            def on_update(self):
                self.wallet = self.parent.wallet
                h = self.wallet.get_history(self.get_domain())
                item = self.currentItem()
                current_tx = item.data(0, Qt.UserRole).toString() if item else None
                self.clear()
       -
                fx = self.parent.fx
                fx.history_used_spot = False
       -
                for h_item in h:
                    tx_hash, height, conf, timestamp, value, balance = h_item
                    status, status_str = self.wallet.get_tx_status(tx_hash, height, conf, timestamp)
   DIR diff --git a/gui/qt/util.py b/gui/qt/util.py
       t@@ -474,7 +474,9 @@ class MyTreeWidget(QTreeWidget):
                if self.editor:
                    self.pending_update = True
                else:
       +            self.setUpdatesEnabled(False)
                    self.on_update()
       +            self.setUpdatesEnabled(True)
        
            def on_update(self):
                pass