Fix adding wxPGProperty to wxPropertyPageState in alphabetical mode

If given wxPGProperty is a subproperty of another property (its parent
is neither root nor category) it shouldn't be added directly
to the alphabetical list. It should be just added as a child property.
This commit is contained in:
Artur Wieczorek
2021-11-07 22:09:05 +01:00
parent 198bd1fe1f
commit 5f0dc6cc0a

View File

@@ -1705,9 +1705,11 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
else if ( parentIsRoot )
// Parent is root.
m_regularArray.DoAddChild( property, -1, false );
else
parent->DoAddChild(property, index, true);
// Add to current mode
if ( !property->IsCategory() )
if ( !property->IsCategory() && (parentIsCategory || parentIsRoot) )
m_abcArray->DoAddChild( property, index, true );
}