Check if wxPGProperty is visible when it is attempted to refresh it.

Check if property page state (not its parent state) is the same as selected page state before refreshing.

Closes #16922.
This commit is contained in:
Artur Wieczorek
2015-04-04 10:16:00 +02:00
parent 1638644ea6
commit 6d3fd35d0c

View File

@@ -1433,10 +1433,14 @@ void wxPropertyGridManager::Refresh(bool eraseBackground, const wxRect* rect )
void wxPropertyGridManager::RefreshProperty( wxPGProperty* p )
{
wxPropertyGrid* grid = p->GetGrid();
wxASSERT( p->IsRoot() ||
p->GetParentState() == p->GetParent()->GetParentState() );
if ( GetPage(m_selPage)->GetStatePtr() == p->GetParent()->GetParentState() )
if ( GetPage(m_selPage)->GetStatePtr() == p->GetParentState() )
{
wxPropertyGrid* grid = p->GetGrid();
grid->RefreshProperty(p);
}
}
// -----------------------------------------------------------------------