mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-4299 - Fixed exception in dialog when pressing Enter with no text in
the field
This commit is contained in:
parent
dffb5fd859
commit
06b33a0d94
1 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
|
@ -258,7 +262,7 @@ public abstract class AbstractNumberInputDialog extends DialogComponentProvider
|
|||
|
||||
//==================================================================================================
|
||||
// Private Methods
|
||||
//==================================================================================================
|
||||
//==================================================================================================
|
||||
|
||||
/**
|
||||
* Create the main panel.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue