mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
qt tx dialog: allow blanking feerate
Previously it was impossible to rm the last character in feerate_edit. e.g. if you held down "backspace", we would keep refilling the field as soon as it became empty.
This commit is contained in:
parent
13b858ab26
commit
710e9621b5
1 changed files with 5 additions and 2 deletions
|
@ -579,6 +579,9 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
|
|||
def on_finalize(self):
|
||||
pass # overridden in subclass
|
||||
|
||||
def update_fee_fields(self):
|
||||
pass # overridden in subclass
|
||||
|
||||
|
||||
class TxDetailLabel(QLabel):
|
||||
def __init__(self, *, word_wrap=None):
|
||||
|
@ -752,7 +755,7 @@ class PreviewTxDialog(BaseTxDialog, TxEditor):
|
|||
displayed_feerate = self.feerate_e.get_amount()
|
||||
if displayed_feerate is not None:
|
||||
displayed_feerate = quantize_feerate(displayed_feerate)
|
||||
else:
|
||||
elif self.fee_slider.is_active():
|
||||
# fallback to actual fee
|
||||
displayed_feerate = quantize_feerate(fee / size) if fee is not None else None
|
||||
self.feerate_e.setAmount(displayed_feerate)
|
||||
|
@ -770,7 +773,7 @@ class PreviewTxDialog(BaseTxDialog, TxEditor):
|
|||
self.feerate_e.setAmount(displayed_feerate)
|
||||
|
||||
# show/hide fee rounding icon
|
||||
feerounding = (fee - displayed_fee) if fee else 0
|
||||
feerounding = (fee - displayed_fee) if (fee and displayed_fee is not None) else 0
|
||||
self.set_feerounding_text(int(feerounding))
|
||||
self.feerounding_icon.setToolTip(self.feerounding_text)
|
||||
self.feerounding_icon.setVisible(abs(feerounding) >= 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue