don't update the tree unnecessarily in Expand/CollapseAllChildren() (patch 1809520)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-10-20 14:55:50 +00:00
parent c4b64a941e
commit 624f89c2d7
3 changed files with 18 additions and 3 deletions

View File

@@ -1646,9 +1646,16 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId)
}
item->Expand();
CalculatePositions();
if ( !m_freezeCount )
{
CalculatePositions();
RefreshSubtree(item);
RefreshSubtree(item);
}
else // frozen
{
m_dirty = true;
}
event.SetEventType(wxEVT_COMMAND_TREE_ITEM_EXPANDED);
GetEventHandler()->ProcessEvent( event );
@@ -3582,7 +3589,10 @@ void wxGenericTreeCtrl::Thaw()
if ( --m_freezeCount == 0 )
{
Refresh();
if ( m_dirty )
DoDirtyProcessing();
else
Refresh();
}
}