Fix EDU-679 do not show (1/1) in create answer placeholder dialog if only one hint...
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Fri, 22 Jul 2016 17:51:04 +0000 (20:51 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Fri, 22 Jul 2016 18:43:00 +0000 (21:43 +0300)
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java

index c130ac3e9dcdb48b36e0aec4205e52837086d2ed..cfe046329c1aa2a0d84a00d1ff5e971a275f42fe 100644 (file)
@@ -49,7 +49,12 @@ public class CCCreateAnswerPlaceholderPanel extends JPanel {
   }
 
   private void updateHintNumberLabel() {
-    myHintLabel.setText("Hints" + "(" + (myShownHintNumber + 1) + "/" + myHints.size() + "):");
+    if (myHints.size() > 1) {
+      myHintLabel.setText("Hint" + "(" + (myShownHintNumber + 1) + "/" + myHints.size() + "):");
+    }
+    else {
+      myHintLabel.setText("Hint: ");
+    }
   }
 
   public void setAnswerPlaceholderText(String answerPlaceholderText) {