From bd4644d1bdcfd5c179d55885fd83d7a0f268566f Mon Sep 17 00:00:00 2001 From: harukalover Date: Thu, 2 Jul 2009 03:33:28 +0000 Subject: [PATCH] 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. --- aegisub/src/dialog_colorpicker.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/aegisub/src/dialog_colorpicker.cpp b/aegisub/src/dialog_colorpicker.cpp index dc30685f4..7b8986df0 100644 --- a/aegisub/src/dialog_colorpicker.cpp +++ b/aegisub/src/dialog_colorpicker.cpp @@ -1190,21 +1190,36 @@ void DialogColorPicker::OnSliderChange(wxCommandEvent &evt) slider->GetXY(x, y); switch (i) { // 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: rgb_input[0]->SetValue(y); +#ifdef __WXGTK__ + UpdateFromRGB(); +#endif break; case 1: rgb_input[1]->SetValue(y); +#ifdef __WXGTK__ + UpdateFromRGB(); +#endif break; case 2: rgb_input[2]->SetValue(y); +#ifdef __WXGTK__ + UpdateFromRGB(); +#endif break; case 3: hsl_input[2]->SetValue(y); +#ifdef __WXGTK__ + UpdateFromHSL(); +#endif break; case 4: hsv_input[0]->SetValue(y); +#ifdef __WXGTK__ + UpdateFromHSV(); +#endif break; } }