- // The item used for viewing the real number: should be a text item.
- wxWindow *m_propertyWindow = property->GetWindow();
- if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
- return FALSE;
-
- wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
-
- float val = 0.0;
- if (!StringToFloat(WXSTRINGCAST value, &val))
- {
- wxChar buf[200];
- wxSprintf(buf, wxT("Value %s is not a valid real number!"), (const wxChar *)value);
- wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
- return FALSE;
- }
-
- if (val < m_realMin || val > m_realMax)
- {
- wxChar buf[200];
- wxSprintf(buf, wxT("Value must be a real number between %.2f and %.2f!"), m_realMin, m_realMax);
- wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
- return FALSE;
- }
- return TRUE;
+ wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
+
+ float val = 0.0;
+ if (!StringToFloat(WXSTRINGCAST value, &val))
+ {
+ wxChar buf[200];
+ wxSprintf(buf, wxT("Value %s is not a valid real number!"), (const wxChar *)value);
+ wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
+ return FALSE;
+ }
+
+ if (val < m_realMin || val > m_realMax)
+ {
+ wxChar buf[200];
+ wxSprintf(buf, wxT("Value must be a real number between %.2f and %.2f!"), m_realMin, m_realMax);
+ wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
+ return FALSE;
+ }
+ return TRUE;