Skip to content

Commit

Permalink
do not call refresh from tool window if already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurnikov committed May 5, 2024
1 parent ec1a0ed commit 4369459
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/kotlin/org/move/cli/toolwindow/AptosToolWindow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ import javax.swing.JComponent

class AptosToolWindowFactory: ToolWindowFactory, DumbAware {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
project.moveProjectsService
.scheduleProjectsRefresh("Aptos Tool Window opened")
if (!project.moveProjectsService.hasAtLeastOneValidProject) {
project.moveProjectsService
.scheduleProjectsRefresh("Aptos Tool Window opened")
}

val toolwindowPanel = AptosToolWindowPanel(project)
val tab = ContentFactory.getInstance()
Expand Down

0 comments on commit 4369459

Please sign in to comment.