git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62884
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- // Update editor control
- //
-
- // We need to check for these, otherwise GetGrid() may fail.
+ // Update editor control.
if ( flags & wxPG_SETVAL_REFRESH_EDITOR )
{
if ( flags & wxPG_SETVAL_REFRESH_EDITOR )
{
wxPropertyGrid* pg = GetGridIfDisplayed();
if ( pg )
wxPropertyGrid* pg = GetGridIfDisplayed();
if ( pg )
+ {
+ wxPGProperty* selected = pg->GetSelectedProperty();
+
+ // Only refresh the control if this was selected, or
+ // this was some parent of selected, or vice versa)
+ if ( selected && (selected == this ||
+ selected->IsSomeParent(this) ||
+ this->IsSomeParent(selected)) )
+ RefreshEditor();
+
pg->DrawItemAndValueRelated(this);
pg->DrawItemAndValueRelated(this);