mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
qt history list: hide columns sooner
while wallet was starting up "hidden columns" were visible
This commit is contained in:
parent
5be6966462
commit
ca1043ffda
3 changed files with 9 additions and 3 deletions
|
@ -89,7 +89,7 @@ class AddressDialog(WindowModalDialog):
|
|||
vbox.addWidget(QLabel(_("History")))
|
||||
addr_hist_model = AddressHistoryModel(self.parent, self.address)
|
||||
self.hw = HistoryList(self.parent, addr_hist_model)
|
||||
addr_hist_model.view = self.hw
|
||||
addr_hist_model.set_view(self.hw)
|
||||
vbox.addWidget(self.hw)
|
||||
|
||||
vbox.addLayout(Buttons(CloseButton(self)))
|
||||
|
|
|
@ -76,10 +76,16 @@ class HistoryModel(QAbstractItemModel, PrintError):
|
|||
def __init__(self, parent):
|
||||
super().__init__(parent)
|
||||
self.parent = parent
|
||||
self.view = None # type: HistoryList # set by caller! FIXME...
|
||||
self.view = None # type: HistoryList
|
||||
self.transactions = OrderedDictWithIndex()
|
||||
self.tx_status_cache = {} # type: Dict[str, Tuple[int, str]]
|
||||
|
||||
def set_view(self, history_list: 'HistoryList'):
|
||||
# FIXME HistoryModel and HistoryList mutually depend on each other.
|
||||
# After constructing both, this method needs to be called.
|
||||
self.view = history_list # type: HistoryList
|
||||
self.set_visibility_of_columns()
|
||||
|
||||
def columnCount(self, parent: QModelIndex):
|
||||
return self.NUM_COLUMNS
|
||||
|
||||
|
|
|
@ -812,7 +812,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
def create_history_tab(self):
|
||||
self.history_model = HistoryModel(self)
|
||||
self.history_list = l = HistoryList(self, self.history_model)
|
||||
self.history_model.view = self.history_list
|
||||
self.history_model.set_view(self.history_list)
|
||||
l.searchable_list = l
|
||||
toolbar = l.create_toolbar(self.config)
|
||||
toolbar_shown = self.config.get('show_toolbar_history', False)
|
||||
|
|
Loading…
Add table
Reference in a new issue