qml: set BtcField.textAsSats initial value to match its text
textAsSats was being set to 0 initially, regardless of actual text, only healing after onTextChanged. fixes https://github.com/spesmilo/electrum/issues/9974
This commit is contained in:
@@ -32,5 +32,5 @@ TextField {
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: textAsSats = Config.unitsToSats('')
|
||||
Component.onCompleted: amount.textChanged()
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ class QEInvoice(QObject, QtEventListener):
|
||||
return self._amountOverride
|
||||
|
||||
@amountOverride.setter
|
||||
def amountOverride(self, new_amount):
|
||||
def amountOverride(self, new_amount: QEAmount):
|
||||
self._logger.debug(f'set new override amount {repr(new_amount)}')
|
||||
self._amountOverride.copyFrom(new_amount)
|
||||
self.amountOverrideChanged.emit()
|
||||
|
||||
Reference in New Issue
Block a user