Use wxVariant::IsType() function to check the type of variant values in propgrid sample.

Use this dedicated function to check the type of variant value instead of calling wxVariant::GetType() function and performing explicit comparisons of returned string.
This commit is contained in:
Artur Wieczorek
2015-05-10 20:19:03 +02:00
parent cc799c10ac
commit a0157b37f2
2 changed files with 3 additions and 3 deletions

View File

@@ -77,9 +77,9 @@ wxFontDataProperty::~wxFontDataProperty () { }
void wxFontDataProperty::OnSetValue()
{
if ( m_value.GetType() != wxT("wxFontData") )
if ( !m_value.IsType(wxT("wxFontData")) )
{
if ( m_value.GetType() == wxT("wxFont") )
if ( m_value.IsType(wxT("wxFont")) )
{
wxFont font;
font << m_value;