By default, always refresh editor and redraw properties when property value is changed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-03-04 19:53:34 +00:00
parent aa960026e6
commit e777bd14b3
5 changed files with 35 additions and 34 deletions

View File

@@ -1327,7 +1327,12 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags )
// We need to check for these, otherwise GetGrid() may fail.
if ( flags & wxPG_SETVAL_REFRESH_EDITOR )
{
RefreshEditor();
wxPropertyGrid* pg = GetGridIfDisplayed();
if ( pg )
pg->DrawItemAndValueRelated(this);
}
}
@@ -1977,6 +1982,8 @@ bool wxPGProperty::IsVisible() const
wxPropertyGrid* wxPGProperty::GetGridIfDisplayed() const
{
wxPropertyGridPageState* state = GetParentState();
if ( !state )
return NULL;
wxPropertyGrid* propGrid = state->GetGrid();
if ( state == propGrid->GetState() )
return propGrid;