- // Add to current mode (no categories).
- if ( !property->IsCategory() )
- m_abcArray->AddChild2( property, index );
- }
+ // Add to current mode.
+ parent->DoAddChild( property, index, true );
+ }
+ else
+ {
+ // We are currently in Non-categorized/Alphabetic mode
+
+ if ( parentIsCategory )
+ // Parent is category.
+ parent->DoAddChild( property, index, false );
+ else if ( parentIsRoot )
+ // Parent is root.
+ m_regularArray.DoAddChild( property, -1, false );
+
+ // Add to current mode
+ if ( !property->IsCategory() )
+ m_abcArray->DoAddChild( property, index, true );