Bug 95925 - "Switching" to the same style that currently previewed triggers preview refresh
Summary: "Switching" to the same style that currently previewed triggers preview refresh
Status: RESOLVED FIXED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmstyle (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Cristian Tibirna
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-28 14:19 UTC by Marcin Orlowski
Modified: 2005-02-22 00:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Orlowski 2004-12-28 14:19:42 UTC
Version:            (using KDE 3.3.1,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-3)
OS:                Linux (i686) release 2.6.9

Switching styles with Widget Style slelection gadget triggers preview refresh no matter if user really changed previewed style say from "A" to "B" or just picked "A" again while "A" being previously selected. This causes unnecesary preview refresh and may also badly flicker on slower machines
Comment 1 Cristian Tibirna 2005-02-22 00:57:14 UTC
CVS commit by tibirna: 

CT: don't flicker style preview if same style chosen in the combobox.
    This patch was checked and fixed by Maksim Orlovich. Thank you.

BUGS:95925


  M +4 -0      kcmstyle.cpp   1.83


--- kdebase/kcontrol/style/kcmstyle.cpp  #1.82:1.83
@@ -838,4 +838,8 @@ void KCMStyle::styleChanged()
 void KCMStyle::switchStyle(const QString& styleName)
 {
+    // Don't flicker the preview if the same style is chosen in the cb
+    if (appliedStyle && appliedStyle->name() == styleName) 
+        return;
+
         // Create an instance of the new style...
         QStyle* style = QStyleFactory::create(styleName);