From 0cce7753c3dd5a011224b424f4fc31e00acdc555 Mon Sep 17 00:00:00 2001 From: Daniel M Date: Mon, 4 Dec 2023 12:01:43 -0500 Subject: [PATCH] fix:run in edt fix #106 --- .../com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt b/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt index c5685881..6e470736 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/LogConsolePanel.kt @@ -13,6 +13,7 @@ import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.DefaultActionGroup import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.application.runInEdt import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.actions.ToggleUseSoftWrapsToolbarAction import com.intellij.openapi.editor.colors.EditorColorsListener @@ -108,11 +109,11 @@ fun createLogConsolePanel( } } model.logModel.addAndInvokeListener { - addConsole(it) + runInEdt { addConsole(it) } } ApplicationManager.getApplication().messageBus.connect(parentDisposable) .subscribe(EditorColorsManager.TOPIC, EditorColorsListener { - addConsole(model.logModel.value) + runInEdt { addConsole(model.logModel.value) } }) return panel } \ No newline at end of file