Reverted to old wxPG_AUTO_SORT behavior in which only root properties and immediate children of categories are (automatically) sorted; Added Sort flags; Applied slight optimization when sorting on propgridmanager page change

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-01-10 15:16:03 +00:00
parent fa8224a15a
commit 0eb877f2c1
7 changed files with 73 additions and 31 deletions

View File

@@ -1180,7 +1180,7 @@ void wxPropertyGrid::PrepareAfterItemsAdded()
m_pState->m_itemsAdded = 0;
if ( m_windowStyle & wxPG_AUTO_SORT )
Sort();
Sort(wxPG_SORT_TOP_LEVEL_ONLY);
RecalculateVirtualSize();
}
@@ -2277,8 +2277,7 @@ void wxPropertyGrid::SwitchState( wxPropertyGridPageState* pNewState )
else if ( !m_frozen )
{
// Refresh, if not frozen.
if ( m_pState->m_itemsAdded )
PrepareAfterItemsAdded();
m_pState->PrepareAfterItemsAdded();
// Reselect
if ( m_pState->m_selected )