mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update combobox on add local interpreter
This commit is contained in:
+3
-2
@@ -332,8 +332,9 @@ public class SdkConfigurationUtil {
|
||||
@Nullable
|
||||
private static Sdk findByPath(SdkType sdkType, Sdk[] sdks, String sdkHome) {
|
||||
for (Sdk sdk : sdks) {
|
||||
if (sdk.getSdkType() == sdkType &&
|
||||
FileUtil.pathsEqual(FileUtil.toSystemIndependentName(sdk.getHomePath()), FileUtil.toSystemIndependentName(sdkHome))) {
|
||||
final String path = sdk.getHomePath();
|
||||
if (sdk.getSdkType() == sdkType && path != null &&
|
||||
FileUtil.pathsEqual(FileUtil.toSystemIndependentName(path), FileUtil.toSystemIndependentName(sdkHome))) {
|
||||
return sdk;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,10 @@ public class PyActiveSdkConfigurable implements UnnamedConfigurable {
|
||||
@Override
|
||||
public void consume(Sdk sdk) {
|
||||
if (sdk == null) return;
|
||||
mySdkAdded = true;
|
||||
mySdkAdded = myProjectSdksModel.findSdk(sdk) == null;
|
||||
if (mySdkAdded) {
|
||||
myProjectSdksModel.addSdk(sdk);
|
||||
}
|
||||
updateSdkList(false);
|
||||
mySdkCombo.getModel().setSelectedItem(sdk);
|
||||
myPackagesPanel.updatePackages(new PyPackageManagementService(myProject, sdk));
|
||||
|
||||
Reference in New Issue
Block a user