mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-06-01 05:41:31 +00:00
Improve file/volume name editing in create wizard.
This commit is contained in:
parent
e0b0cb5d8b
commit
f378b7f586
|
@ -125,8 +125,13 @@ public class DiskImageNamePane extends WizardPane {
|
|||
* @return the modified name
|
||||
*/
|
||||
private String edit(String name, Event e) {
|
||||
if (e.character != '\b') return name + e.text;
|
||||
else return name.substring(0, name.length() - 1);
|
||||
if (e.character == '\b') {
|
||||
return name.substring(0, e.start)
|
||||
+ name.substring(e.end);
|
||||
} else {
|
||||
return name.substring(0, e.start)
|
||||
+ e.text + name.substring(e.end);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Enable the Next button when data has been entered into all fields.
|
||||
|
|
Loading…
Reference in New Issue
Block a user