From 2770f76de51766c60856b78e52d890d3688a0a80 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 29 Jun 2015 20:03:25 +0200 Subject: [PATCH] Fix wxPropertyGridManager::SelectProperty Call wxPropertyGridpageState::DoSelectProperty with explicitly set flags instead of casting from bool to unisgned int. It cannot be guaranteed that 0/1 values of this implicit conversion will be mapped to the proper flags also int the future. --- include/wx/propgrid/manager.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index dc7580011e..bc12292332 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -535,7 +535,11 @@ public: bool SelectProperty( wxPGPropArg id, bool focus = false ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) - return p->GetParentState()->DoSelectProperty(p, focus); + unsigned int flags = wxPG_SEL_DONT_SEND_EVENT; + if ( focus ) + flags |= wxPG_SEL_FOCUS; + + return p->GetParentState()->DoSelectProperty(p, flags); } #if wxUSE_HEADERCTRL