Merge remote-tracking branch 'origin/master'
authorEkaterina Tuzova <Ekaterina.Tuzova@jetbrains.com>
Wed, 30 Jul 2014 10:26:35 +0000 (14:26 +0400)
committerEkaterina Tuzova <Ekaterina.Tuzova@jetbrains.com>
Wed, 30 Jul 2014 10:26:35 +0000 (14:26 +0400)
python/ide/src/com/jetbrains/python/newProject/actions/AbstractProjectSettingsStep.java
python/ide/src/com/jetbrains/python/newProject/actions/PyCharmNewProjectStep.java

index d9f3cf24f0e5d59761bbec77dfbdbe86aa4ccf74..fa8614e993eb887ec61690316fd1580c75c44371 100644 (file)
@@ -65,6 +65,7 @@ abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
   private ActionButtonWithText myCreateButton;
   private JLabel myErrorLabel;
   private AnAction myCreateAction;
+  private Sdk mySdk;
 
   public AbstractProjectSettingsStep(DirectoryProjectGenerator projectGenerator, NullableConsumer<AbstractProjectSettingsStep> callback) {
     super();
@@ -394,9 +395,14 @@ abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
   }
 
   public Sdk getSdk() {
+    if (mySdk != null) return mySdk;
     return (Sdk)mySdkCombo.getComboBox().getSelectedItem();
   }
 
+  public void setSdk(final Sdk sdk) {
+    mySdk = sdk;
+  }
+
   public String getProjectLocation() {
     return myLocationField.getText();
   }
index b6134ed5f07037b3118c33f4d006be2ba8937976..7a430aec26804abee663f5bb63871c2985c725c3 100644 (file)
@@ -87,6 +87,7 @@ public class PyCharmNewProjectStep extends DefaultActionGroup implements DumbAwa
           sdk = SdkConfigurationUtil.setupSdk(ProjectJdkTable.getInstance().getAllJdks(), sdkHome, PythonSdkType.getInstance(), true, null,
                                               null);
           model.addSdk(sdk);
+          settingsStep.setSdk(sdk);
           try {
             model.apply();
           }