From ca4292afcb893d2e39b965719ec45f1470377296 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 17 Oct 2013 14:24:09 +0200 Subject: [PATCH] clear cache on Darcula On/Off --- platform/util/src/com/intellij/openapi/util/IconLoader.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/util/src/com/intellij/openapi/util/IconLoader.java b/platform/util/src/com/intellij/openapi/util/IconLoader.java index a16af63471cf..d0ce5bc9f86f 100644 --- a/platform/util/src/com/intellij/openapi/util/IconLoader.java +++ b/platform/util/src/com/intellij/openapi/util/IconLoader.java @@ -324,15 +324,21 @@ public final class IconLoader { private Object myRealIcon; @NotNull private final URL myUrl; + private boolean dark; public CachedImageIcon(@NotNull URL url) { myUrl = url; + dark = USE_DARK_ICONS; } @NotNull private synchronized Icon getRealIcon() { if (isLoaderDisabled()) return EMPTY_ICON; + if (dark != USE_DARK_ICONS) { + myRealIcon = null; + dark = USE_DARK_ICONS; + } Object realIcon = myRealIcon; if (realIcon instanceof Icon) return (Icon)realIcon;