mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
Ignore whitespace in port input field.
This commit is contained in:
parent
b69af245e6
commit
f534754f10
|
@ -142,7 +142,7 @@ public class MainWindow {
|
|||
});
|
||||
port[r].addFocusListener(new FocusAdapter() {
|
||||
@Override
|
||||
public void focusLost(FocusEvent focusEvent) {
|
||||
public void focusLost(FocusEvent event) {
|
||||
portChanged(engineNo);
|
||||
}
|
||||
});
|
||||
|
@ -164,7 +164,7 @@ public class MainWindow {
|
|||
});
|
||||
filename[r].addFocusListener(new FocusAdapter() {
|
||||
@Override
|
||||
public void focusLost(FocusEvent focusEvent) {
|
||||
public void focusLost(FocusEvent event) {
|
||||
filenameChanged(engineNo);
|
||||
}
|
||||
});
|
||||
|
@ -186,7 +186,7 @@ public class MainWindow {
|
|||
});
|
||||
arguments[r].addFocusListener(new FocusAdapter() {
|
||||
@Override
|
||||
public void focusLost(FocusEvent focusEvent) {
|
||||
public void focusLost(FocusEvent event) {
|
||||
argumentsChanged(engineNo);
|
||||
}
|
||||
});
|
||||
|
@ -226,7 +226,7 @@ public class MainWindow {
|
|||
private void portChanged(int engineNo) {
|
||||
EngineConfig config = configs[engineNo];
|
||||
try {
|
||||
int p = Integer.valueOf(port[engineNo].getText());
|
||||
int p = Integer.valueOf(port[engineNo].getText().trim());
|
||||
if (p >= 1024 && p < 65536 && p != config.port) {
|
||||
config.port = p;
|
||||
server.configChanged(engineNo);
|
||||
|
|
Loading…
Reference in New Issue
Block a user