IDEA-360318 Spring Structure View: wrong view after reopening IDEA

(cherry picked from commit 740c6e68144d3469f639cf0ef5d7df6e8b35e066)

IJ-CR-149597

GitOrigin-RevId: 4543b4374e4cc3279ddc61ae9abfc32196e035eb
This commit is contained in:
Anton Kozub
2024-11-18 14:25:39 +01:00
committed by intellij-monorepo-bot
parent 829b85afd1
commit 6f2cd64d5e

View File

@@ -161,7 +161,9 @@ class StructureViewWrapperImpl(
ApplicationManager.getApplication().messageBus.connect(this).subscribe(STRUCTURE_CHANGED, Runnable { clearCaches() })
ApplicationManager.getApplication().messageBus.connect(this).subscribe(ProjectCloseListener.TOPIC, object : ProjectCloseListener {
override fun projectClosingBeforeSave(project: Project) {
StructureViewState.getInstance(project).selectedTab = myToolWindow.contentManager.selectedContent?.tabName
myToolWindow.contentManager.selectedContent?.tabName
?.takeIf { it.isNotEmpty() }
?.let { StructureViewState.getInstance(project).selectedTab = it }
}
})