Skip to content

Commit 097a2ef

Browse files
committed
chore: disable on no view
1 parent e700dda commit 097a2ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugin/src/main/kotlin/spp/jetbrains/sourcemarker/view/action/ChangeTimeAction.kt

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ class ChangeTimeAction(private val viewManager: LiveViewChartManager) : AnAction
3535
templatePresentation.text = "Change Time"
3636
}
3737

38+
override fun update(e: AnActionEvent) {
39+
e.presentation.isEnabled = viewManager.currentView != null
40+
}
41+
3842
override fun actionPerformed(e: AnActionEvent) {
3943
JBPopupFactory.getInstance().createListPopup(
4044
object : ListPopupStep<String> {

0 commit comments

Comments
 (0)