Browse Source
qt main_window: fix visual artifact when opening (re invoice lists)
InvoiceList.update() calls hide_if_empty(), which calls setVisible().
setVisible(True) should not be called before the widget is properly parented and put into a layout,
as that results in a blank window flashing up (appearing and disappearing) briefly.
patch-4
SomberNight
3 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
3 changed files with
2 additions and
2 deletions
electrum/gui/qt/invoice_list.py
electrum/gui/qt/main_window.py
electrum/gui/qt/request_list.py
@ -73,7 +73,6 @@ class InvoiceList(MyTreeView):
self . setModel ( self . proxy )
self . setSortingEnabled ( True )
self . setSelectionMode ( QAbstractItemView . ExtendedSelection )
self . update ( )
def refresh_row ( self , key , row ) :
invoice = self . parent . wallet . invoices . get ( key )
@ -1264,6 +1264,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
vbox . addWidget ( self . receive_requests_label )
vbox . addWidget ( self . request_list )
vbox . setStretchFactor ( self . request_list , 1000 )
self . request_list . update ( ) # after parented and put into a layout, can update without flickering
return w
@ -1553,6 +1554,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
vbox . addWidget ( self . invoice_list )
vbox . setStretchFactor ( self . invoice_list , 1000 )
w . searchable_list = self . invoice_list
self . invoice_list . update ( ) # after parented and put into a layout, can update without flickering
run_hook ( ' create_send_tab ' , grid )
return w
@ -74,7 +74,6 @@ class RequestList(MyTreeView):
self . setSortingEnabled ( True )
self . selectionModel ( ) . currentRowChanged . connect ( self . item_changed )
self . setSelectionMode ( QAbstractItemView . ExtendedSelection )
self . update ( )
def select_key ( self , key ) :
for i in range ( self . model ( ) . rowCount ( ) ) :