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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user