mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Fix disappearing of Python repository from settings after Clion restart (CPP-7743)
Python plugin stored the interpreter setting as a module sdk, which was wiped out with it's order entries by Clion. The fix is to store the interpreter setting in a facet and reinitialize it after Clion model clearing.
This commit is contained in:
+2
-2
@@ -238,7 +238,7 @@ public class PyActiveSdkConfigurable implements UnnamedConfigurable {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Sdk getSdk() {
|
||||
protected Sdk getSdk() {
|
||||
if (myModule == null) {
|
||||
return ProjectRootManager.getInstance(myProject).getProjectSdk();
|
||||
}
|
||||
@@ -302,7 +302,7 @@ public class PyActiveSdkConfigurable implements UnnamedConfigurable {
|
||||
}
|
||||
}
|
||||
|
||||
private void setSdk(final Sdk item) {
|
||||
protected void setSdk(final Sdk item) {
|
||||
ApplicationManager.getApplication().runWriteAction(() -> ProjectRootManager.getInstance(myProject).setProjectSdk(item));
|
||||
if (myModule != null) {
|
||||
ModuleRootModificationUtil.setModuleSdk(myModule, item);
|
||||
|
||||
Reference in New Issue
Block a user