+void
+ColourConversionEditor::changed (wxSpinCtrlDouble* sc)
+{
+ /* On OS X, it seems that in some cases when a wxSpinCtrlDouble loses focus
+ it emits an erroneous changed signal, which messes things up.
+ Check for that here.
+ */
+ if (fabs (_last_spin_ctrl_value[sc] - sc->GetValue()) < 1e-3) {
+ return;
+ }
+
+ Changed ();
+}
+
+void
+ColourConversionEditor::set_spin_ctrl (wxSpinCtrlDouble* control, double value)
+{
+ _last_spin_ctrl_value[control] = value;
+ control->SetValue (value);
+}
+