Fixed an issue with the spectrum slider not updating the color spectrum in the color picker dialog on Linux

Originally committed to SVN as r3093.
This commit is contained in:
harukalover 2009-07-02 03:33:28 +00:00
parent 49423c613e
commit c2d89e8898
1 changed files with 16 additions and 1 deletions

View File

@ -1190,21 +1190,36 @@ void DialogColorPicker::OnSliderChange(wxCommandEvent &evt)
slider->GetXY(x, y); slider->GetXY(x, y);
switch (i) { switch (i) {
// setting the value of a component input automatically invalidates the spectrum // setting the value of a component input automatically invalidates the spectrum
// and calls the according UpdateFromXXX() function // and calls the according UpdateFromXXX() function in wxMSW and wxMac, wxGTK must be manually updated
case 0: case 0:
rgb_input[0]->SetValue(y); rgb_input[0]->SetValue(y);
#ifdef __WXGTK__
UpdateFromRGB();
#endif
break; break;
case 1: case 1:
rgb_input[1]->SetValue(y); rgb_input[1]->SetValue(y);
#ifdef __WXGTK__
UpdateFromRGB();
#endif
break; break;
case 2: case 2:
rgb_input[2]->SetValue(y); rgb_input[2]->SetValue(y);
#ifdef __WXGTK__
UpdateFromRGB();
#endif
break; break;
case 3: case 3:
hsl_input[2]->SetValue(y); hsl_input[2]->SetValue(y);
#ifdef __WXGTK__
UpdateFromHSL();
#endif
break; break;
case 4: case 4:
hsv_input[0]->SetValue(y); hsv_input[0]->SetValue(y);
#ifdef __WXGTK__
UpdateFromHSV();
#endif
break; break;
} }
} }