mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 07:23:25 +00:00
qt TxDialog: visibility of widgets should be set after parenting
widget.show() and widget.setVisible(True) results in a blink of an ephemeral window containing the widget; that is, unless the widget has a parent explicitly set or it can be determined via which layout the widget is placed in.
This commit is contained in:
parent
c9ede07462
commit
dbd1c8cf71
1 changed files with 4 additions and 2 deletions
|
@ -558,8 +558,6 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
|
||||||
self.rbf_cb = QCheckBox(_('Replace by fee'))
|
self.rbf_cb = QCheckBox(_('Replace by fee'))
|
||||||
self.rbf_cb.setChecked(bool(self.config.get('use_rbf', True)))
|
self.rbf_cb.setChecked(bool(self.config.get('use_rbf', True)))
|
||||||
vbox_right.addWidget(self.rbf_cb)
|
vbox_right.addWidget(self.rbf_cb)
|
||||||
self.rbf_label.setVisible(self.finalized)
|
|
||||||
self.rbf_cb.setVisible(not self.finalized)
|
|
||||||
|
|
||||||
self.locktime_label = TxDetailLabel()
|
self.locktime_label = TxDetailLabel()
|
||||||
vbox_right.addWidget(self.locktime_label)
|
vbox_right.addWidget(self.locktime_label)
|
||||||
|
@ -572,6 +570,10 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
|
||||||
|
|
||||||
vbox.addLayout(hbox_stats)
|
vbox.addLayout(hbox_stats)
|
||||||
|
|
||||||
|
# set visibility after parenting can be determined by Qt
|
||||||
|
self.rbf_label.setVisible(self.finalized)
|
||||||
|
self.rbf_cb.setVisible(not self.finalized)
|
||||||
|
|
||||||
def set_title(self):
|
def set_title(self):
|
||||||
self.setWindowTitle(_("Create transaction") if not self.finalized else _("Transaction"))
|
self.setWindowTitle(_("Create transaction") if not self.finalized else _("Transaction"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue