PY-13562 New Project: there is no focus in project location

This commit is contained in:
Ekaterina Tuzova
2016-05-26 17:36:54 +03:00
parent 716a359211
commit f41e46174a
@@ -289,7 +289,12 @@ public class ProjectSettingsStepBase extends AbstractActionWithPanel implements
protected final LabeledComponent<TextFieldWithBrowseButton> createLocationComponent() {
myLocationField = new TextFieldWithBrowseButton();
myProjectDirectory = findSequentNonExistingUntitled();
myLocationField.setText(myProjectDirectory.toString());
final String projectLocation = myProjectDirectory.toString();
myLocationField.setText(projectLocation);
final int index = projectLocation.lastIndexOf(File.separator);
if (index > 0) {
myLocationField.getTextField().select(index + 1, projectLocation.length());
}
final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
myLocationField.addBrowseFolderListener("Select base directory", "Select base directory for the Project",