diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index b8a1581e5a..4920599944 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -1957,7 +1957,7 @@ public: void SetLabel( const wxString& label ) { m_label = label; } - inline void SetName( const wxString& newName ); + void SetName( const wxString& newName ); /** Changes what sort of parent this property is for its children. diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index d9744d8173..974fd034cd 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1914,11 +1914,6 @@ inline void wxPGProperty::SetEditor( const wxString& editorName ) m_customEditor = wxPropertyGridInterface::GetEditorByName(editorName); } -inline void wxPGProperty::SetName( const wxString& newName ) -{ - GetGrid()->SetPropertyName(this, newName); -} - inline bool wxPGProperty::Hide( bool hide, int flags ) { return GetGrid()->HideProperty(this, hide, flags); diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index bbd56c2a03..4f38e08d6b 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -613,6 +613,15 @@ bool wxPGProperty::IsSomeParent( wxPGProperty* candidate ) const return false; } +void wxPGProperty::SetName( const wxString& newName ) +{ + wxPropertyGrid* pg = GetGrid(); + + if ( pg ) + pg->SetPropertyName(this, newName); + else + DoSetName(newName); +} wxString wxPGProperty::GetName() const {