use last subtask index instead of subtask number
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / actions / CCNewSubtaskAction.java
index 4e224d258f5e18a0911a2304156a58b4405f67f6..11581f3d8830b75b0131d69afd8b41feda0581b8 100644 (file)
@@ -60,9 +60,9 @@ public class CCNewSubtaskAction extends DumbAwareAction {
       return;
     }
     createTestsForNewSubtask(project, task);
-    int num = task.getSubtaskNum();
+    int num = task.getLastSubtaskIndex() + 1;
     createTaskDescriptionFile(project, taskDir, num);
-    task.setSubtaskNum(num + 1);
+    task.setLastSubtaskIndex(num);
     StudySubtaskUtils.switchStep(project, task, num);
   }