X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f73eddd2a5af3c58fff4e2a6154d9a395b7631a5..677dc0ed1a3ff68af15f6246d6d0708d5264b07a:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 87a01089a1..d30b80d4f0 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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(); } }