X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92ffc98a0816dc6d046edb70d7fb063912391eb7..9581362b151a80bc62bf3ed6f9fae70481ea7723:/src/propgrid/property.cpp diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 7f2f5a66ed..221ebb4f77 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -1634,18 +1634,20 @@ long wxPGProperty::GetAttributeAsLong( const wxString& name, long defVal ) const { wxVariant variant = m_attributes.FindValue(name); - return wxPGVariantToInt(variant, defVal); + if ( variant.IsNull() ) + return defVal; + + return variant.GetLong(); } double wxPGProperty::GetAttributeAsDouble( const wxString& name, double defVal ) const { - double retVal; wxVariant variant = m_attributes.FindValue(name); - if ( wxPGVariantToDouble(variant, &retVal) ) - return retVal; + if ( variant.IsNull() ) + return defVal; - return defVal; + return variant.GetDouble(); } wxVariant wxPGProperty::GetAttributesAsList() const