[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kcontrol/style
From:       Maks Orlovich <maksim () kde ! org>
Date:       2005-02-22 15:08:00
Message-ID: 20050222150800.25772ED8A () office ! kde ! org
[Download RAW message or body]

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;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic