From 198bd1fe1f62b5579c0c5adf1b4793321f4482ed Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 7 Nov 2021 21:55:03 +0100 Subject: [PATCH] Fix setting categorized/alphabetic mode for inserted wxPropertyGridPage State of the newly added wxPropertyGridPage should have the same categorized/alphabetic mode like associated wxPropertyGrid. --- src/propgrid/manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 2395c0b1d4..487e1a5c5d 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -995,6 +995,10 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index, { state->m_pPropGrid = m_pPropGrid; state->InitNonCatMode(); + if ( !isPageInserted ) + { + state->EnableCategories(m_pPropGrid->HasFlag(wxPG_HIDE_CATEGORIES) ? false : true); + } } if ( !label.empty() )