From 125d2fe90e6a832c8b375e124692b4a761791c27 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 23 Jan 2020 19:46:59 +0100 Subject: [PATCH] Use dedicated function to check if wxPGProperty is of category type We have a dedicated function for this purpose so there is no need to check the flag directly. --- src/propgrid/property.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 3488feebe1..f2c96bd1b7 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -509,8 +509,8 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState, wxPGCell& cell = m_cells[i]; if ( cell.IsInvalid() ) { - cell = HasFlag(wxPG_PROP_CATEGORY) ? propgrid->GetCategoryDefaultCell() - : propgrid->GetPropertyDefaultCell(); + cell = IsCategory() ? propgrid->GetCategoryDefaultCell() + : propgrid->GetPropertyDefaultCell(); } } @@ -1599,8 +1599,8 @@ void wxPGProperty::EnsureCells( unsigned int column ) if ( pg ) { - defaultCell = HasFlag(wxPG_PROP_CATEGORY) ? pg->GetCategoryDefaultCell() - : pg->GetPropertyDefaultCell(); + defaultCell = IsCategory() ? pg->GetCategoryDefaultCell() + : pg->GetPropertyDefaultCell(); } // Alloc new default cells.