Fixed bug: wxPGProperty::SetName() crashed if it was called before property was added to grid (fixes #11111)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1957,7 +1957,7 @@ public:
|
|||||||
|
|
||||||
void SetLabel( const wxString& label ) { m_label = label; }
|
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.
|
Changes what sort of parent this property is for its children.
|
||||||
|
@@ -1914,11 +1914,6 @@ inline void wxPGProperty::SetEditor( const wxString& editorName )
|
|||||||
m_customEditor = wxPropertyGridInterface::GetEditorByName(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 )
|
inline bool wxPGProperty::Hide( bool hide, int flags )
|
||||||
{
|
{
|
||||||
return GetGrid()->HideProperty(this, hide, flags);
|
return GetGrid()->HideProperty(this, hide, flags);
|
||||||
|
@@ -613,6 +613,15 @@ bool wxPGProperty::IsSomeParent( wxPGProperty* candidate ) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxPGProperty::SetName( const wxString& newName )
|
||||||
|
{
|
||||||
|
wxPropertyGrid* pg = GetGrid();
|
||||||
|
|
||||||
|
if ( pg )
|
||||||
|
pg->SetPropertyName(this, newName);
|
||||||
|
else
|
||||||
|
DoSetName(newName);
|
||||||
|
}
|
||||||
|
|
||||||
wxString wxPGProperty::GetName() const
|
wxString wxPGProperty::GetName() const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user