Extend functionality of wxPropertyGridInterface::SetPropertyColoursToDefault method.
SetPropertyTextColour, SetPropertyBackgroundColour methods are able to set colours recursively for sub-properties but SetPropertyColoursToDefault method is not. For the sake of consistency, SetPropertyColoursToDefault method is extended to have the same capabilities as SetPropertyTextColour and SetPropertyBackgroundColour. Behaviour and signature in default case (no recursion) is preserved. For internal purposes there were also implemented helper methods in wxPGProperty class: SetDefaultColours, ClearCells.
This commit is contained in:
@@ -685,11 +685,18 @@ void wxPropertyGridInterface::SetPropertyTextColour( wxPGPropArg id,
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void wxPropertyGridInterface::SetPropertyColoursToDefault( wxPGPropArg id )
|
||||
#if WXWIN_COMPATIBILITY_3_0
|
||||
void wxPropertyGridInterface::SetPropertyColoursToDefault(wxPGPropArg id)
|
||||
{
|
||||
SetPropertyColoursToDefault(id, wxPG_DONT_RECURSE);
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_3_0
|
||||
|
||||
void wxPropertyGridInterface::SetPropertyColoursToDefault(wxPGPropArg id, int flags)
|
||||
{
|
||||
wxPG_PROP_ARG_CALL_PROLOG()
|
||||
|
||||
p->m_cells.clear();
|
||||
p->SetDefaultColours(flags);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user