commit dbd1c8cf71877dbca03501c07848655fdcf1a5bf
parent c9ede074629a4bbb02f94522a32469d5a5eaeadb
Author: SomberNight <somber.night@protonmail.com>
Date: Thu, 12 Dec 2019 21:31:30 +0100
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.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/electrum/gui/qt/transaction_dialog.py b/electrum/gui/qt/transaction_dialog.py
@@ -558,8 +558,6 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
self.rbf_cb = QCheckBox(_('Replace by fee'))
self.rbf_cb.setChecked(bool(self.config.get('use_rbf', True)))
vbox_right.addWidget(self.rbf_cb)
- self.rbf_label.setVisible(self.finalized)
- self.rbf_cb.setVisible(not self.finalized)
self.locktime_label = TxDetailLabel()
vbox_right.addWidget(self.locktime_label)
@@ -572,6 +570,10 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
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):
self.setWindowTitle(_("Create transaction") if not self.finalized else _("Transaction"))