hide and make visible from prev subtasks actions
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / actions / CCAddAnswerPlaceholder.java
index 564c68abc7a9ac8a0276a16e1bceab4546bebca2..7c00126fd105879dbc5b09376f022a08bc20c2f4 100644 (file)
@@ -75,7 +75,6 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction {
     }
     final AnswerPlaceholder answerPlaceholder = new AnswerPlaceholder();
     AnswerPlaceholderSubtaskInfo info = new AnswerPlaceholderSubtaskInfo();
-    info.setNeedInsertText(!model.hasSelection());
     answerPlaceholder.getSubtaskInfos().put(stepIndex, info);
     int index = taskFile.getAnswerPlaceholders().size();
     answerPlaceholder.setIndex(index);
@@ -92,7 +91,7 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction {
     String answerPlaceholderText = dlg.getTaskText();
     answerPlaceholder.setPossibleAnswer(model.hasSelection() ? model.getSelectedText() : defaultPlaceholderText);
     answerPlaceholder.setTaskText(StringUtil.notNullize(answerPlaceholderText));
-    answerPlaceholder.setLength(model.hasSelection() ? StringUtil.notNullize(answerPlaceholderText).length() : 0);
+    answerPlaceholder.setLength(StringUtil.notNullize(answerPlaceholderText).length());
     answerPlaceholder.setHints(dlg.getHints());
 
     if (!model.hasSelection()) {