From d0eea355fa8c0125f64c5c24d67feb0235d6a358 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 27 Aug 2015 19:16:29 +0200 Subject: [PATCH] Fixed turning on/off 'Category Specific Colours' in propgrid sample. When specific colours are turned on then custom colours are assigned to both category properties and their sub-properties. But when specific colours are turned off then only category properties are reverted to default colours what is misleading. Now, all properties are reverted to default colours. --- samples/propgrid/propgrid.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index d26d885d48..39b4e2d82d 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -2836,9 +2836,12 @@ void FormMain::OnCatColours( wxCommandEvent& event ) { // Revert to original. pg->SetPropertyColoursToDefault( wxT("Appearance") ); + pg->SetPropertyColoursToDefault( wxT("Appearance"), wxPG_RECURSE ); pg->SetPropertyColoursToDefault( wxT("PositionCategory") ); + pg->SetPropertyColoursToDefault( wxT("PositionCategory"), wxPG_RECURSE ); pg->SetPropertyColoursToDefault( wxT("Environment") ); - pg->SetPropertyColoursToDefault( wxT("More Examples") ); + pg->SetPropertyColoursToDefault( wxT("Environment"), wxPG_RECURSE ); + pg->SetPropertyColoursToDefault( wxT("More Examples"), wxPG_RECURSE ); } m_pPropGridManager->Thaw(); m_pPropGridManager->Refresh();