Implement TransferToWindow in DoubleValidator. Closes #1606.

This commit is contained in:
Thomas Goyne 2013-05-25 15:46:57 -07:00
parent 061e2a1ada
commit e84b24e9f3

View file

@ -310,7 +310,11 @@ namespace Automation4 {
DoubleValidator(double *value) : value(value) { }
wxValidator *Clone() const { return new DoubleValidator(value); }
bool Validate(wxWindow*) { return true; }
bool TransferToWindow() { return true; }
bool TransferToWindow() {
static_cast<wxSpinCtrlDouble*>(GetWindow())->SetValue(*value);
return true;
}
bool TransferFromWindow() {
*value = static_cast<wxSpinCtrlDouble*>(GetWindow())->GetValue();