Minor Change hint showing order after hint removing
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 26 Jul 2016 12:26:48 +0000 (15:26 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 26 Jul 2016 15:52:59 +0000 (18:52 +0300)
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java

index b03ec3db89dd21dace33e1816c8b97630a346da6..34fc57c328ff2797ff2ef86743646ef130ca67c4 100644 (file)
@@ -184,12 +184,7 @@ public class CCCreateAnswerPlaceholderPanel {
     @Override
     public void actionPerformed(AnActionEvent e) {
       myHints.remove(myShownHintNumber);
-      if (myHints.size() == 1) {
-        myShownHintNumber = 0;
-      }
-      else {
-        myShownHintNumber += myShownHintNumber + 1 < myHints.size() ? 1 : -1;
-      }
+      myShownHintNumber += myShownHintNumber < myHints.size() ? 0 : -1;
       showHint(myHints.get(myShownHintNumber));
     }