From b0660cc87c46f28a6aa542541ad73d5846fced5f Mon Sep 17 00:00:00 2001 From: Dummy Date: Wed, 23 Jan 2019 20:08:57 +0100 Subject: [PATCH] Pass argument of proper type to wxPropertyGridInterface::SetPropertyBackgroundColour The last argument passed to this function should be an int flag not a Boolean value. Boolean value 'true' passed here is converted to int 1 so wxPG_RECURSE flag is never set and the background colour is never changed for sub-properties. Closes #18333. --- samples/propgrid/propgrid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index 134c43cd88..db343f3a21 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -2575,8 +2575,8 @@ FormMain::OnSetBackgroundColour( wxCommandEvent& event ) if ( col.IsOk() ) { - bool recursively = (event.GetId()==ID_SETBGCOLOURRECUR) ? true : false; - pg->SetPropertyBackgroundColour(prop, col, recursively); + int flags = (event.GetId()==ID_SETBGCOLOURRECUR) ? wxPG_RECURSE : 0; + pg->SetPropertyBackgroundColour(prop, col, flags); } }