mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +00:00
Merge pull request #2989
8c8faf2
Support comma seperator for amount field, dynamically change to dot. Fixes #2951 (xmrdsc)
This commit is contained in:
commit
b62b821002
1 changed files with 2 additions and 1 deletions
|
@ -296,6 +296,7 @@ Rectangle {
|
|||
inlineButtonText: qsTr("All") + translationManager.emptyString
|
||||
inlineButton.onClicked: amountLine.text = "(all)"
|
||||
onTextChanged: {
|
||||
amountLine.text = amountLine.text.replace(",", ".");
|
||||
const match = amountLine.text.match(/^0+(\d.*)/);
|
||||
if (match) {
|
||||
const cursorPosition = amountLine.cursorPosition;
|
||||
|
@ -311,7 +312,7 @@ Rectangle {
|
|||
}
|
||||
|
||||
validator: RegExpValidator {
|
||||
regExp: /^(\d{1,8})?([\.]\d{1,12})?$/
|
||||
regExp: /^(\d{1,8})?([\.,]\d{1,12})?$/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue