Bug 58773

Summary: Widget color dropdown resets to top option (Standard Background) after hitting apply
Product: kcontrol Reporter: Sean Lynch <techniq35>
Component: kcmcolorsAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Sean Lynch 2003-05-21 23:56:53 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    SuSE RPMs

After clicking the apply button, the widget color dropdown resets itself.  I'm not sure if this was intended or not, but it can be annoying when your checking out different colors for a specific widget, and having to choose it from the list each time (I've changed the Standard Background I don't know how many times on accident).
Comment 1 Waldo Bastian 2003-06-21 14:48:37 UTC
Subject: KDE_3_1_BRANCH: kdebase/kcontrol/colors

CVS commit by waba: 

Don't reset widget selection dropdown when selecting a different theme.
(BR58773)
CCMAIL:58773-done@bugs.kde.org


  M +7 -5      colorscm.cpp   1.69.2.1


--- kdebase/kcontrol/colors/colorscm.cpp  #1.69:1.69.2.1
@@ -290,5 +290,5 @@ void KColorScheme::load()
 
     cs->drawSampleWidgets();
-    slotWidgetColor(0);
+    slotWidgetColor(wcCombo->currentItem());
     sb->blockSignals(true);
     sb->setValue(cs->contrast);
@@ -403,5 +403,5 @@ void KColorScheme::defaults()
 
     cs->drawSampleWidgets();
-    slotWidgetColor(0);
+    slotWidgetColor(wcCombo->currentItem());
     sb->blockSignals(true);
     sb->setValue(cs->contrast);
@@ -686,4 +686,6 @@ void KColorScheme::slotSelectColor(const
 void KColorScheme::slotWidgetColor(int indx)
 {
+    if (indx < 0)
+        indx = 0;
     if (wcCombo->currentItem() != indx)
     wcCombo->setCurrentItem( indx );
@@ -892,5 +894,5 @@ void KColorScheme::slotPreviewScheme(int
     sb->setValue(cs->contrast);
     sb->blockSignals(false);
-    slotWidgetColor(0);
+    slotWidgetColor(wcCombo->currentItem());
     if (indx < nSysSchemes)
        removeBt->setEnabled(false);


Comment 2 F Friedrich 2003-09-09 02:55:31 UTC
In KDE 3.1.3 this only happens when the color of the selection widget itself 
changes. So, changing from "KDE1" to "KDE2" schemes is no problem, since the 
selection box background stays white. However, when you change from "KDE2" 
(white background) to "CDE" (grey background), the selection jumps to the 
first item after pressing apply.