URI: 
       tgui remove_local_tx: update all tabs - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 52acb7ab66d68da9ed5f6ceda58181abf1153825
   DIR parent f46b776031f558cc612cef8e37780458661d31fa
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Thu,  1 Feb 2018 23:48:25 +0100
       
       gui remove_local_tx: update all tabs
       
       Diffstat:
         M gui/qt/history_list.py              |      15 +++++----------
       
       1 file changed, 5 insertions(+), 10 deletions(-)
       ---
   DIR diff --git a/gui/qt/history_list.py b/gui/qt/history_list.py
       t@@ -25,7 +25,7 @@
        
        import webbrowser
        
       -from electrum.wallet import UnrelatedTransactionException
       +from electrum.wallet import UnrelatedTransactionException, TX_HEIGHT_LOCAL
        from .util import *
        from electrum.i18n import _
        from electrum.util import block_explorer_URL
       t@@ -71,6 +71,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
        
            @profiler
            def on_update(self):
       +        # TODO save and restore scroll position (maybe based on y coord or selected item?)
                self.wallet = self.parent.wallet
                h = self.wallet.get_history(self.get_domain())
                item = self.currentItem()
       t@@ -162,7 +163,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
        
                menu = QMenu()
        
       -        if height == -2:
       +        if height == TX_HEIGHT_LOCAL:
                    menu.addAction(_("Remove"), lambda: self.remove_local_tx(tx_hash))
        
                menu.addAction(_("Copy %s")%column_title, lambda: self.parent.app.clipboard().setText(column_data))
       t@@ -201,14 +202,8 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
                for tx in to_delete:
                    self.wallet.remove_transaction(tx)
                self.wallet.save_transactions(write=True)
       -        root = self.invisibleRootItem()
       -        child_count = root.childCount()
       -        _offset = 0
       -        for i in range(child_count):
       -            item = root.child(i - _offset)
       -            if item.data(0, Qt.UserRole) in to_delete:
       -                root.removeChild(item)
       -                _offset += 1
       +        # need to update at least: history_list, utxo_list, address_list
       +        self.parent.need_update.set()
        
            def onFileAdded(self, fn):
                with open(fn) as f: