EDU-692 Change default selected option and task name in "Create new task" dialog appcode/163.2166
authorLiana Bakradze <liana.bakradze@jetbrains.com>
Tue, 2 Aug 2016 16:52:45 +0000 (19:52 +0300)
committerLiana Bakradze <liana.bakradze@jetbrains.com>
Tue, 2 Aug 2016 16:52:45 +0000 (19:52 +0300)
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateStudyItemPanel.java
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCItemPositionPanel.java

index 572ba0806508ba3955cde2346b9fe8d794e84d7d..b006845318a94b4aebe5d5f9357f2a11ee0872e2 100644 (file)
@@ -13,7 +13,8 @@ public class CCCreateStudyItemPanel extends JPanel {
   public CCCreateStudyItemPanel(String itemName, String thresholdName, int thresholdIndex) {
     myThresholdName = thresholdName;
     myItemName = itemName;
   public CCCreateStudyItemPanel(String itemName, String thresholdName, int thresholdIndex) {
     myThresholdName = thresholdName;
     myItemName = itemName;
-    myNameField.setText(itemName + thresholdIndex);
+    int newIndex = thresholdIndex + 1;
+    myNameField.setText(itemName + newIndex);
     add(myPanel, BorderLayout.CENTER);
   }
 
     add(myPanel, BorderLayout.CENTER);
   }
 
index 2b15aa9b85b4bc20dca063250f0564383c4d9ba8..a680c07f04c34c575e088b8bc6c77dfff1240610 100644 (file)
@@ -22,7 +22,7 @@ public class CCItemPositionPanel extends JPanel {
     group.add(myAfterButton);
     myBeforeButton.setText("before " + postfix);
     myAfterButton.setText("after " + postfix);
     group.add(myAfterButton);
     myBeforeButton.setText("before " + postfix);
     myAfterButton.setText("after " + postfix);
-    myBeforeButton.setSelected(true);
+    myAfterButton.setSelected(true);
   }
 
   public int getIndexDelta() {
   }
 
   public int getIndexDelta() {