Fixed setting property label with wxPGproperty::SetLabel
If there is a corresponding cell containing a cached text for column 0 then this text also needs to be updated when the label is changed. See #16982.
This commit is contained in:
parent
dd036218bd
commit
91144a2247
@ -2128,7 +2128,7 @@ public:
|
|||||||
m_helpString = helpString;
|
m_helpString = helpString;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetLabel( const wxString& label ) { m_label = label; }
|
void SetLabel( const wxString& label );
|
||||||
|
|
||||||
void SetName( const wxString& newName );
|
void SetName( const wxString& newName );
|
||||||
|
|
||||||
|
@ -705,6 +705,20 @@ bool wxPGProperty::IsSomeParent( wxPGProperty* candidate ) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxPGProperty::SetLabel(const wxString& label)
|
||||||
|
{
|
||||||
|
m_label = label;
|
||||||
|
// Update cell text if possible
|
||||||
|
if ( HasCell(0) )
|
||||||
|
{
|
||||||
|
wxPGCell& cell = GetCell(0);
|
||||||
|
if ( cell.HasText() )
|
||||||
|
{
|
||||||
|
cell.SetText(label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxPGProperty::SetName( const wxString& newName )
|
void wxPGProperty::SetName( const wxString& newName )
|
||||||
{
|
{
|
||||||
wxPropertyGrid* pg = GetGrid();
|
wxPropertyGrid* pg = GetGrid();
|
||||||
|
Loading…
Reference in New Issue
Block a user