mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-846 create an editor window in bulk mode - no need to repaint (as it will be called on editor creation)
GitOrigin-RevId: 5e9a77846b04626a2da2db9878f9b9e81d4ffc4b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
76578a159c
commit
92f91e1d47
+1
-1
@@ -680,7 +680,7 @@ private class EditorTabs(
|
||||
override fun revalidateAndRepaint(layoutNow: Boolean) {
|
||||
// called from super constructor
|
||||
@Suppress("SENSELESS_COMPARISON")
|
||||
if (window == null || !window.owner.isInsideChange) {
|
||||
if (window != null && !window.owner.isInsideChange) {
|
||||
super.revalidateAndRepaint(layoutNow)
|
||||
}
|
||||
}
|
||||
|
||||
+14
-7
@@ -905,14 +905,21 @@ private class UiBuilder(private val splitters: EditorsSplitters) {
|
||||
requestFocus: Boolean) {
|
||||
coroutineScope {
|
||||
val windowDeferred = async(Dispatchers.EDT) {
|
||||
val editorWindow = EditorWindow(owner = splitters, splitters.coroutineScope.childScope(CoroutineName("EditorWindow")))
|
||||
splitters.addWindow(editorWindow)
|
||||
editorWindow.component.isFocusable = false
|
||||
if (tabSizeLimit != 1) {
|
||||
editorWindow.tabbedPane.component.putClientProperty(JBTabsImpl.SIDE_TABS_SIZE_LIMIT_KEY, tabSizeLimit)
|
||||
splitters.insideChange++
|
||||
try {
|
||||
val editorWindow = EditorWindow(owner = splitters, splitters.coroutineScope.childScope(CoroutineName("EditorWindow")))
|
||||
splitters.addWindow(editorWindow)
|
||||
editorWindow.component.isFocusable = false
|
||||
if (tabSizeLimit != 1) {
|
||||
editorWindow.tabbedPane.component.putClientProperty(JBTabsImpl.SIDE_TABS_SIZE_LIMIT_KEY, tabSizeLimit)
|
||||
}
|
||||
addChild(editorWindow.component)
|
||||
editorWindow
|
||||
}
|
||||
finally {
|
||||
// do not call `validate` - will be called on editor `add` in any case
|
||||
splitters.insideChange--
|
||||
}
|
||||
addChild(editorWindow.component)
|
||||
editorWindow
|
||||
}
|
||||
|
||||
val fileEditorManager = splitters.manager
|
||||
|
||||
Reference in New Issue
Block a user