mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 04:16:02 -04:00
Fix typo in FXUtils (#3631)
This commit is contained in:
parent
3d3896c5c4
commit
6f8002a0cf
@ -584,7 +584,7 @@ public final class FXUtils {
|
|||||||
focusedListener = (observable, oldFocused, newFocused) -> {
|
focusedListener = (observable, oldFocused, newFocused) -> {
|
||||||
if (oldFocused && !newFocused) {
|
if (oldFocused && !newFocused) {
|
||||||
if (textField.validate()) {
|
if (textField.validate()) {
|
||||||
uppdateProperty();
|
updateProperty();
|
||||||
} else {
|
} else {
|
||||||
// Rollback to old value
|
// Rollback to old value
|
||||||
updateTextField();
|
updateTextField();
|
||||||
@ -596,7 +596,7 @@ public final class FXUtils {
|
|||||||
if (oldScene != null && newScene == null) {
|
if (oldScene != null && newScene == null) {
|
||||||
// Component is being removed from scene
|
// Component is being removed from scene
|
||||||
if (textField.validate()) {
|
if (textField.validate()) {
|
||||||
uppdateProperty();
|
updateProperty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -606,7 +606,7 @@ public final class FXUtils {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void uppdateProperty() {
|
public void updateProperty() {
|
||||||
String newText = textField.getText();
|
String newText = textField.getText();
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
T newValue = converter == null ? (T) newText : converter.fromString(newText);
|
T newValue = converter == null ? (T) newText : converter.fromString(newText);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user