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.
This commit is contained in:
Artur Wieczorek
2020-01-23 19:46:59 +01:00
parent 9ac6c7906a
commit 125d2fe90e

View File

@@ -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.