EDU-536 Open task file with placeholders when new task opened
authorLiana Bakradze <liana.bakradze@jetbrains.com>
Fri, 24 Jun 2016 12:08:11 +0000 (15:08 +0300)
committerLiana Bakradze <liana.bakradze@jetbrains.com>
Fri, 24 Jun 2016 12:08:11 +0000 (15:08 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyTaskNavigationAction.java

index efc81bc33be7f2c19289130776e6f2470a9db442..97495aad8f0d97f159fe8302bc0267b8bc158b5c 100644 (file)
@@ -92,8 +92,10 @@ abstract public class StudyTaskNavigationAction extends StudyActionWithShortcut
       VirtualFile srcDir = taskDir.findChild(EduNames.SRC);
       VirtualFile vf = srcDir == null ? taskDir.findChild(name) : srcDir.findChild(name);
       if (vf != null) {
-        FileEditorManager.getInstance(project).openFile(vf, true);
-        if (!taskFile.getAnswerPlaceholders().isEmpty()) {
+        if (shouldBeActive != null) {
+          FileEditorManager.getInstance(project).openFile(vf, true);
+        }
+        if (shouldBeActive == null && !taskFile.getAnswerPlaceholders().isEmpty()) {
           shouldBeActive = vf;
         }
       }