save changes from edit placeholder
authorLiana.Bakradze <liana.bakradze@jetbrains.com>
Thu, 3 Nov 2016 10:52:45 +0000 (13:52 +0300)
committerliana.bakradze <liana.bakradze@jetbrains.com>
Thu, 17 Nov 2016 14:08:39 +0000 (17:08 +0300)
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCEditAnswerPlaceholder.java

index a1abac8999752dcfac5e44593e80ea8c65e9af4e..85a2c91fa774dd62e80bb0739a5d450c4ca28613 100644 (file)
@@ -28,7 +28,10 @@ public class CCEditAnswerPlaceholder extends CCAnswerPlaceholderAction {
     }
     CCCreateAnswerPlaceholderDialog dlg = new CCCreateAnswerPlaceholderDialog(project, answerPlaceholder.getTaskText(), answerPlaceholder.getHints());
     dlg.setTitle("Edit Answer Placeholder");
-    dlg.show();
+    if (dlg.showAndGet()) {
+      answerPlaceholder.setTaskText(dlg.getTaskText());
+      answerPlaceholder.setHints(dlg.getHints());
+    }
   }
 
   @Override