mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-345661 Don't associate removed plugin UI theme with the Default editor scheme after unloading the plugin
GitOrigin-RevId: 20993500abda9a4247e9180fc49a20b5f9c08fe8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
80e720a862
commit
d1413a558c
@@ -35,6 +35,8 @@ public abstract class EditorColorsManager {
|
||||
|
||||
public abstract @NotNull EditorColorsScheme getGlobalScheme();
|
||||
|
||||
public abstract @Nullable EditorColorsScheme getActiveVisibleScheme();
|
||||
|
||||
public abstract EditorColorsScheme getScheme(@NotNull String schemeName);
|
||||
|
||||
public abstract boolean isDefaultScheme(EditorColorsScheme scheme);
|
||||
|
||||
@@ -527,7 +527,9 @@ class LafManagerImpl(private val coroutineScope: CoroutineScope) : LafManager(),
|
||||
private fun setLookAndFeelImpl(lookAndFeelInfo: UIThemeLookAndFeelInfo, installEditorScheme: Boolean) {
|
||||
val oldLaf = currentTheme
|
||||
|
||||
rememberSchemeForLaf(EditorColorsManager.getInstance().globalScheme)
|
||||
EditorColorsManager.getInstance().activeVisibleScheme ?.let {
|
||||
rememberSchemeForLaf(it)
|
||||
}
|
||||
|
||||
if (oldLaf !== lookAndFeelInfo && oldLaf != null) {
|
||||
oldLaf.dispose()
|
||||
|
||||
+5
-3
@@ -374,12 +374,14 @@ class EditorColorsManagerImpl @NonInjectable constructor(schemeManagerFactory: S
|
||||
}.getOrLogException(LOG)
|
||||
}
|
||||
|
||||
override fun getGlobalScheme(): EditorColorsScheme {
|
||||
override fun getGlobalScheme(): EditorColorsScheme = activeVisibleScheme ?: getDefaultScheme()
|
||||
|
||||
override fun getActiveVisibleScheme(): EditorColorsScheme? {
|
||||
val scheme = schemeManager.activeScheme
|
||||
if (scheme is AbstractColorsScheme && !scheme.isReadOnly && !scheme.isVisible) {
|
||||
return getDefaultScheme()
|
||||
return null
|
||||
}
|
||||
return scheme?.let { getEditableCopy(it) } ?: scheme ?: getDefaultScheme()
|
||||
return scheme?.let { getEditableCopy(it) } ?: scheme
|
||||
}
|
||||
|
||||
private fun getDefaultScheme(): EditorColorsScheme {
|
||||
|
||||
Reference in New Issue
Block a user