X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/91c818f82929ee2164ac5cfc77eaecddcea937a0..914073189107fb2f0f4f78d7c98fbcc37c700d50:/src/propgrid/property.cpp diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index addc80c0c2..1897d12761 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -639,10 +639,10 @@ int wxPGProperty::Index( const wxPGProperty* p ) const return wxNOT_FOUND; } -void wxPGProperty::UpdateControl( wxWindow* primary ) +void wxPGProperty::UpdateControl( wxWindow* editorWnd ) { - if ( primary ) - GetEditorClass()->UpdateControl(this, primary); + if ( editorWnd ) + GetEditorClass()->UpdateControl(this, editorWnd); } bool wxPGProperty::ValidateValue( wxVariant& WXUNUSED(value), wxPGValidationInfo& WXUNUSED(validationInfo) ) const @@ -1336,18 +1336,13 @@ void wxPGProperty::SetFlagRecursively( FlagType flag, bool set ) void wxPGProperty::RefreshEditor() { - if ( m_parent && GetParentState() ) - { - wxPropertyGrid* pg = GetParentState()->GetGrid(); - if ( pg->GetSelectedProperty() == this ) - { - wxWindow* editor = pg->GetEditorControl(); - if ( editor ) - GetEditorClass()->UpdateControl( this, editor ); - } - } -} + if ( !m_parent ) + return; + wxPropertyGrid* pg = GetGrid(); + if ( pg && pg->GetSelectedProperty() == this ) + UpdateControl(pg->GetEditorControl()); +} wxVariant wxPGProperty::GetDefaultValue() const {