]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
Border corrections
[wxWidgets.git] / src / generic / treectlg.cpp
index 87a01089a1de020f8d9126115c9c9a5cf7dcdbf8..d30b80d4f0e97e691557f4972a845a67d5cd479f 100644 (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();
     }
 }