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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user