GP-4299 - Fixed exception in dialog when pressing Enter with no text in

the field
This commit is contained in:
dragonmacher 2024-02-05 13:36:36 -05:00
parent dffb5fd859
commit 06b33a0d94

View file

@ -102,7 +102,11 @@ public abstract class AbstractNumberInputDialog extends DialogComponentProvider
*/
protected JPanel buildMainPanel(String prompt, boolean showAsHex) {
JPanel panel = createPanel(prompt);
numberInputField.addActionListener(e -> okCallback());
numberInputField.addActionListener(e -> {
if (okButton.isEnabled()) {
okCallback();
}
});
if (showAsHex) {
numberInputField.setHexMode();