fix: fall back to "Select *" text if nothing is selected
This commit is contained in:
parent
5671847bf7
commit
d3ccb51df4
@ -23,7 +23,7 @@ class SDContestSelectionComboBoxAction : ComboBoxAction(), DumbAware {
|
||||
|
||||
override fun update(e: AnActionEvent) {
|
||||
e.presentation.isEnabledAndVisible = SDom.loggedIn
|
||||
SDom.currentContest?.let { e.presentation.setText(it.name, false) }
|
||||
e.presentation.setText(SDom.currentContest?.name ?: "Select Contest", false)
|
||||
}
|
||||
|
||||
override fun createPopupActionGroup(button: JComponent, dataContext: DataContext): DefaultActionGroup {
|
||||
|
@ -20,7 +20,7 @@ class SDProblemSelectionComboBoxAction : ComboBoxAction(), DumbAware {
|
||||
override fun update(e: AnActionEvent) {
|
||||
e.presentation.isVisible = SDom.loggedIn
|
||||
e.presentation.isEnabled = SDom.loggedIn && SDom.currentContest != null
|
||||
SDom.currentProblem?.let { e.presentation.setText(it.name, false) }
|
||||
e.presentation.setText(SDom.currentProblem?.name ?: "Select Problem", false)
|
||||
}
|
||||
|
||||
override fun createPopupActionGroup(button: JComponent, dataContext: DataContext): DefaultActionGroup {
|
||||
|
Loading…
Reference in New Issue
Block a user