diff --git a/svg.cpp b/svg.cpp index 1ecb28958..d66866f2c 100644 --- a/svg.cpp +++ b/svg.cpp @@ -366,6 +366,8 @@ class SvgPrivate } eraseRenderer(); + itemsToSave.clear(); + saveTimer->stop(); emit q->repaintNeeded(); } diff --git a/theme.cpp b/theme.cpp index e66262a89..d9c19e2e0 100644 --- a/theme.cpp +++ b/theme.cpp @@ -100,6 +100,7 @@ public: void compositingChanged(); void discardCache(); void discardCache(bool recreateElementsCache); + void colorsChanged(); bool useCache(); static const char *defaultTheme; @@ -187,10 +188,10 @@ void ThemePrivate::discardCache() void ThemePrivate::discardCache(bool recreateElementsCache) { + KPixmapCache::deleteCache("plasma_theme_" + themeName); delete pixmapCache; pixmapCache = 0; invalidElements.clear(); - KPixmapCache::deleteCache("plasma_theme_" + themeName); svgElementsCache = 0; @@ -205,6 +206,13 @@ void ThemePrivate::discardCache(bool recreateElementsCache) } } +void ThemePrivate::colorsChanged() +{ + discardCache(true); + colorScheme = KColorScheme(QPalette::Active, KColorScheme::Window, colors); + buttonColorScheme = KColorScheme(QPalette::Active, KColorScheme::Button, colors); +} + class ThemeSingleton { public: @@ -331,14 +339,14 @@ void Theme::setThemeName(const QString &themeName) disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SIGNAL(themeChanged())); disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), - this, SLOT(discardCache())); + this, SLOT(colorsChanged())); if (colorsFile.isEmpty()) { d->colors = 0; connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SIGNAL(themeChanged())); connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), - this, SLOT(discardCache())); + this, SLOT(colorsChanged())); } else { d->colors = KSharedConfig::openConfig(colorsFile); } diff --git a/theme.h b/theme.h index 4be996114..a7ac3ec63 100644 --- a/theme.h +++ b/theme.h @@ -259,6 +259,7 @@ class PLASMA_EXPORT Theme : public QObject Q_PRIVATE_SLOT(d, void compositingChanged()) Q_PRIVATE_SLOT(d, void discardCache()) + Q_PRIVATE_SLOT(d, void colorsChanged()) }; } // Plasma namespace