Put all validator-related code inside wxUSE_VALIDATORS check
Don't bother defining a variable which is only used when wxUSE_VALIDATORS==1 if it's 0.
This commit is contained in:
parent
fb7cde39bc
commit
d40e245abb
1 changed files with 2 additions and 2 deletions
|
|
@ -258,6 +258,7 @@ private:
|
|||
|
||||
if ( m_combo )
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
wxString allowedChars = wxS("0123456789");
|
||||
|
||||
const wxChar *p2 = m_format.c_str();
|
||||
|
|
@ -269,11 +270,10 @@ private:
|
|||
allowedChars << (*p2++); // append char
|
||||
}
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
wxTextValidator tv(wxFILTER_INCLUDE_CHAR_LIST);
|
||||
tv.SetCharIncludes(allowedChars);
|
||||
m_combo->SetValidator(tv);
|
||||
#endif
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
if ( GetDate().IsValid() )
|
||||
m_combo->SetText(GetDate().Format(m_format));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue