mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
grab focus in show all action from interpreter combobox
This commit is contained in:
@@ -165,9 +165,13 @@ public class PyActiveSdkConfigurable implements UnnamedConfigurable {
|
||||
@Override
|
||||
public void setSelectedItem(Object item) {
|
||||
if (SHOW_ALL.equals(item)) {
|
||||
PythonSdkDetailsDialog options = myModule == null ? new PythonSdkDetailsDialog(myProject, myDetailsCallback) :
|
||||
new PythonSdkDetailsDialog(myModule, myDetailsCallback);
|
||||
options.show();
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
PythonSdkDetailsDialog options = myModule == null ? new PythonSdkDetailsDialog(myProject, myDetailsCallback) :
|
||||
new PythonSdkDetailsDialog(myModule, myDetailsCallback);
|
||||
options.show();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!PySdkListCellRenderer.SEPARATOR.equals(item))
|
||||
|
||||
@@ -235,6 +235,7 @@ public class PythonSdkDetailsDialog extends DialogWrapper {
|
||||
mySdkList.updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Sdk getSdk() {
|
||||
if (myModule == null) {
|
||||
@@ -246,12 +247,13 @@ public class PythonSdkDetailsDialog extends DialogWrapper {
|
||||
|
||||
private void addSdk(AnActionButton button) {
|
||||
PythonSdkDetailsStep
|
||||
.show(myProject, myProjectSdksModel.getSdks(), this, myMainPanel, button.getPreferredPopupPoint().getScreenPoint(), false, new NullableConsumer<Sdk>() {
|
||||
@Override
|
||||
public void consume(Sdk sdk) {
|
||||
addCreatedSdk(sdk, false);
|
||||
}
|
||||
});
|
||||
.show(myProject, myProjectSdksModel.getSdks(), this, myMainPanel, button.getPreferredPopupPoint().getScreenPoint(), false,
|
||||
new NullableConsumer<Sdk>() {
|
||||
@Override
|
||||
public void consume(Sdk sdk) {
|
||||
addCreatedSdk(sdk, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addCreatedSdk(@Nullable final Sdk sdk, boolean newVirtualEnv) {
|
||||
|
||||
Reference in New Issue
Block a user