SEBSERV-273 fixed

This commit is contained in:
anhefti 2022-02-09 13:27:17 +01:00
parent db0591f1eb
commit a55cc57cb5

View file

@ -542,10 +542,6 @@ public class WidgetFactory {
return input; return input;
} }
// public Text numberInput(final Composite content, final Consumer<String> numberCheck, final LocTextKey label) {
// return numberInput(content, numberCheck, false, label);
// }
public Text numberInput( public Text numberInput(
final Composite content, final Composite content,
final Consumer<String> numberCheck, final Consumer<String> numberCheck,
@ -563,6 +559,9 @@ public class WidgetFactory {
if (numberCheck != null) { if (numberCheck != null) {
numberInput.addListener(SWT.Verify, event -> { numberInput.addListener(SWT.Verify, event -> {
final String value = event.text; final String value = event.text;
if (StringUtils.isBlank(value)) {
return;
}
try { try {
numberCheck.accept(value); numberCheck.accept(value);
} catch (final Exception e) { } catch (final Exception e) {