1
0

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:
SomberNight
2025-06-23 14:12:57 +00:00
parent c1d21aab1d
commit 71627b91c4
2 changed files with 2 additions and 2 deletions

View File

@@ -32,5 +32,5 @@ TextField {
}
}
Component.onCompleted: textAsSats = Config.unitsToSats('')
Component.onCompleted: amount.textChanged()
}

View File

@@ -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()