mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix for PY-12186 Project interpreter: not able to select element in appeared settings menu
This commit is contained in:
@@ -129,7 +129,7 @@ public class PyActiveSdkConfigurable implements UnnamedConfigurable {
|
||||
PythonSdkDetailsStep
|
||||
.show(myProject, myProjectSdksModel.getSdks(),
|
||||
myModule == null ? new PythonSdkDetailsDialog(myProject, myDetailsCallback) :
|
||||
new PythonSdkDetailsDialog(myModule, myDetailsCallback),
|
||||
new PythonSdkDetailsDialog(myModule, myDetailsCallback), myMainPanel,
|
||||
RelativePoint.fromScreen(myDetailsButton.getLocationOnScreen()), true,
|
||||
new NullableConsumer<Sdk>() {
|
||||
@Override
|
||||
|
||||
@@ -246,7 +246,7 @@ public class PythonSdkDetailsDialog extends DialogWrapper {
|
||||
|
||||
private void addSdk(AnActionButton button) {
|
||||
PythonSdkDetailsStep
|
||||
.show(myProject, myProjectSdksModel.getSdks(), this, button.getPreferredPopupPoint(), false, new NullableConsumer<Sdk>() {
|
||||
.show(myProject, myProjectSdksModel.getSdks(), this, myMainPanel, button.getPreferredPopupPoint(), false, new NullableConsumer<Sdk>() {
|
||||
@Override
|
||||
public void consume(Sdk sdk) {
|
||||
addCreatedSdk(sdk, false);
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.jetbrains.python.remote.PythonRemoteInterpreterManager;
|
||||
import com.jetbrains.python.sdk.flavors.PythonSdkFlavor;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -53,11 +54,12 @@ public class PythonSdkDetailsStep extends BaseListPopupStep<String> {
|
||||
|
||||
public static void show(final Project project,
|
||||
final Sdk[] existingSdks,
|
||||
DialogWrapper component, final RelativePoint popupPoint,
|
||||
DialogWrapper moreDialog,
|
||||
JComponent ownerComponent, final RelativePoint popupPoint,
|
||||
final boolean showMore,
|
||||
final NullableConsumer<Sdk> callback) {
|
||||
myMore = component;
|
||||
final ListPopupStep sdkHomesStep = new PythonSdkDetailsStep(project, popupPoint.getComponent(), existingSdks, showMore, callback);
|
||||
myMore = moreDialog;
|
||||
final ListPopupStep sdkHomesStep = new PythonSdkDetailsStep(project, ownerComponent, existingSdks, showMore, callback);
|
||||
final ListPopup popup = JBPopupFactory.getInstance().createListPopup(sdkHomesStep);
|
||||
popup.show(popupPoint);
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ public class PythonSdkType extends SdkType {
|
||||
public void showCustomCreateUI(SdkModel sdkModel, final JComponent parentComponent, final Consumer<Sdk> sdkCreatedCallback) {
|
||||
Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(parentComponent));
|
||||
PythonSdkDetailsStep
|
||||
.show(project, sdkModel.getSdks(), null, RelativePoint.getCenterOf(parentComponent), true, new NullableConsumer<Sdk>() {
|
||||
.show(project, sdkModel.getSdks(), null, parentComponent, RelativePoint.getCenterOf(parentComponent), true, new NullableConsumer<Sdk>() {
|
||||
@Override
|
||||
public void consume(@Nullable Sdk sdk) {
|
||||
if (sdk != null) {
|
||||
|
||||
Reference in New Issue
Block a user