From fe924be26179f178dc2cb8381bff8aacc1f2175d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 12 Oct 2018 22:21:28 +0200 Subject: [PATCH] Use dedicated function to check if property is a wxRootProperty --- src/propgrid/propgrid.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 7bdc51d985..0bd991cabc 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -2608,8 +2608,7 @@ void wxPropertyGrid::DrawItemAndValueRelated( wxPGProperty* p ) wxPGProperty* parent = p->GetParent(); while ( parent && - !parent->IsCategory() && - parent->GetParent() ) + !parent->IsCategory() && !parent->IsRoot() ) { DrawItem(parent); parent = parent->GetParent();