X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09777a5bb58bfa29fb8c0dfdfc0057cbdf9517d9..743b426605478eeb31232c30e804e70ff493b1f2:/src/propgrid/advprops.cpp diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 52609a0bf3..7fa93bcc19 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -660,8 +660,7 @@ void wxFontProperty::OnSetValue() if ( !font.Ok() ) { - font = wxFont(10,wxSWISS,wxNORMAL,wxNORMAL); - m_value << font; + m_value << *wxNORMAL_FONT; } } @@ -712,14 +711,16 @@ void wxFontProperty::RefreshChildren() Item(5)->SetValue( font.GetUnderlined() ); } -void wxFontProperty::ChildChanged( wxVariant& thisValue, int ind, wxVariant& childValue ) const +wxVariant wxFontProperty::ChildChanged( wxVariant& thisValue, + int ind, + wxVariant& childValue ) const { wxFont font; font << thisValue; if ( ind == 0 ) { - font.SetPointSize( wxPGVariantToInt(childValue) ); + font.SetPointSize( childValue.GetLong() ); } else if ( ind == 1 ) { @@ -762,7 +763,9 @@ void wxFontProperty::ChildChanged( wxVariant& thisValue, int ind, wxVariant& chi font.SetUnderlined( childValue.GetBool() ); } - thisValue << font; + wxVariant newVariant; + newVariant << font; + return newVariant; } /* @@ -1422,7 +1425,7 @@ bool wxSystemColourProperty::DoSetAttribute( const wxString& name, wxVariant& va { if ( name == wxPG_COLOUR_ALLOW_CUSTOM ) { - int ival = wxPGVariantToInt(value); + int ival = value.GetLong(); if ( ival && (m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) ) {