From f6bf3de76d44e35944da85429a9a24c42c98854d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Tue, 17 Feb 2015 20:42:15 +0000 Subject: [PATCH] Refresh property grid when property is switched to read-only state. Property grid is refreshed to reflect the new state of the property. This is the backport of r76875. See #16306. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/propgrid/propgridiface.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/wx/propgrid/propgridiface.h b/include/wx/propgrid/propgridiface.h index a553d6dba1..d63f71eeb8 100644 --- a/include/wx/propgrid/propgridiface.h +++ b/include/wx/propgrid/propgridiface.h @@ -1077,6 +1077,14 @@ public: p->SetFlagRecursively(wxPG_PROP_READONLY, set); else p->ChangeFlag(wxPG_PROP_READONLY, set); + + wxPropertyGridPageState* state = p->GetParentState(); + if( state ) + { + // If property is attached to the property grid + // then refresh the view. + RefreshProperty( p ); + } } /** Sets property's value to unspecified.