diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudySwitchTaskPanelAction.kt b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudySwitchTaskPanelAction.kt index 720bb12a3aa7..449503989fd5 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudySwitchTaskPanelAction.kt +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudySwitchTaskPanelAction.kt @@ -73,8 +73,12 @@ class StudySwitchTaskPanelAction: AnAction() { } override fun update(e: AnActionEvent?) { - if (e != null) { - StudyUtils.updateAction(e) + val project = e?.project + if (project != null && StudyUtils.isStudyProject(project)) { + e?.presentation?.isEnabled = true + } + else { + e?.presentation?.isEnabled = false } } } \ No newline at end of file