mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[threading] IJPL-184084: Temporarily add read access to paint method of markdown components
GitOrigin-RevId: e0c0ec315b6464891b43f7403b6d29af519fd9ec
This commit is contained in:
committed by
intellij-monorepo-bot
parent
685ae10979
commit
f8426a3889
+10
-7
@@ -14,6 +14,7 @@ import com.intellij.openapi.actionSystem.DataSink
|
||||
import com.intellij.openapi.actionSystem.impl.ToolbarUtils
|
||||
import com.intellij.openapi.application.ModalityState
|
||||
import com.intellij.openapi.application.invokeLater
|
||||
import com.intellij.openapi.application.runReadAction
|
||||
import com.intellij.openapi.command.executeCommand
|
||||
import com.intellij.openapi.editor.Document
|
||||
import com.intellij.openapi.editor.Editor
|
||||
@@ -78,13 +79,15 @@ internal class HorizontalBarPresentation(private val editor: Editor, private val
|
||||
get() = boundsState.height
|
||||
|
||||
override fun paint(graphics: Graphics2D, attributes: TextAttributes) {
|
||||
if (isInvalid) {
|
||||
return
|
||||
}
|
||||
graphics.useCopy { local ->
|
||||
GraphicsUtil.setupAntialiasing(local)
|
||||
GraphicsUtil.setupRoundedBorderAntialiasing(local)
|
||||
paintBars(local)
|
||||
runReadAction {
|
||||
if (isInvalid) {
|
||||
return@runReadAction
|
||||
}
|
||||
graphics.useCopy { local ->
|
||||
GraphicsUtil.setupAntialiasing(local)
|
||||
GraphicsUtil.setupRoundedBorderAntialiasing(local)
|
||||
paintBars(local)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-8
@@ -13,6 +13,7 @@ import com.intellij.openapi.actionSystem.DataSink
|
||||
import com.intellij.openapi.actionSystem.impl.ToolbarUtils
|
||||
import com.intellij.openapi.application.ModalityState
|
||||
import com.intellij.openapi.application.invokeLater
|
||||
import com.intellij.openapi.application.runReadAction
|
||||
import com.intellij.openapi.command.executeCommand
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.markup.TextAttributes
|
||||
@@ -108,15 +109,17 @@ internal class VerticalBarPresentation(
|
||||
if (editor.isDisposed || boundsState == initialState) {
|
||||
return
|
||||
}
|
||||
SlowOperations.knownIssue("IJPL-162800").use {
|
||||
if (!row.isValid) {
|
||||
return
|
||||
runReadAction {
|
||||
SlowOperations.knownIssue("IJPL-162800").use {
|
||||
if (!row.isValid) {
|
||||
return@runReadAction
|
||||
}
|
||||
}
|
||||
graphics.useCopy { local ->
|
||||
GraphicsUtil.setupAntialiasing(local)
|
||||
GraphicsUtil.setupRoundedBorderAntialiasing(local)
|
||||
paintRow(local, rowLocation)
|
||||
}
|
||||
}
|
||||
graphics.useCopy { local ->
|
||||
GraphicsUtil.setupAntialiasing(local)
|
||||
GraphicsUtil.setupRoundedBorderAntialiasing(local)
|
||||
paintRow(local, rowLocation)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user