From kde-commits Tue Feb 22 15:08:00 2005 From: Maks Orlovich Date: Tue, 22 Feb 2005 15:08:00 +0000 To: kde-commits Subject: kdebase/kcontrol/style Message-Id: <20050222150800.25772ED8A () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=110908490120538 CVS commit by orlovich: Fix regression introduced by the repaint optimization: force restyle when changing style settings. Thanks to Zogje for noticing the problem M +6 -6 kcmstyle.cpp 1.84 M +1 -1 kcmstyle.h 1.23 --- kdebase/kcontrol/style/kcmstyle.h #1.22:1.23 @@ -74,5 +74,5 @@ public: protected: bool findStyle( const QString& str, int& combobox_item ); - void switchStyle(const QString& styleName); + void switchStyle(const QString& styleName, bool force = false); void setStyleRecursive(QWidget* w, QStyle* s); --- kdebase/kcontrol/style/kcmstyle.cpp #1.83:1.84 @@ -456,5 +456,5 @@ void KCMStyle::styleSpecificConfig() if (dial->exec() == QDialog::Accepted && dial->isDirty() ) { // Force re-rendering of the preview, to apply settings - switchStyle(currentStyle()); + switchStyle(currentStyle(), true); //For now, ask all KDE apps to recreate their styles to apply the setitngs @@ -836,8 +836,8 @@ void KCMStyle::styleChanged() -void KCMStyle::switchStyle(const QString& styleName) +void KCMStyle::switchStyle(const QString& styleName, bool force) { // Don't flicker the preview if the same style is chosen in the cb - if (appliedStyle && appliedStyle->name() == styleName) + if (!force && appliedStyle && appliedStyle->name() == styleName) return;