]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
fixing the usage of hishape
[wxWidgets.git] / src / generic / treectlg.cpp
index 87a01089a1de020f8d9126115c9c9a5cf7dcdbf8..d28e2bc4b90a7b8d50d7d016b6f38c962bbce334 100644 (file)
@@ -790,7 +790,7 @@ void wxGenericTreeCtrl::Init()
 
     m_lastOnSame = false;
 
-#ifdef __WXMAC_CARBON__
+#ifdef __WXMAC__
     m_normalFont.MacCreateThemeFont( kThemeViewsFont ) ;
 #else
     m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
@@ -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 );
@@ -2243,7 +2250,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
         {
             int flags = wxCONTROL_SELECTED;
             if (m_hasFocus
-#ifdef __WXMAC__
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
                 && IsControlActive( (ControlRef)GetHandle() )
 #endif
             )
@@ -2383,7 +2390,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
 
         wxColour colText;
         if ( item->IsSelected()
-#ifdef __WXMAC__
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
             // On wxMac, if the tree doesn't have the focus we draw an empty
             // rectangle, so we want to make sure that the text is visible
             // against the normal background, not the highlightbackground, so
@@ -3582,7 +3589,10 @@ void wxGenericTreeCtrl::Thaw()
 
     if ( --m_freezeCount == 0 )
     {
-        Refresh();
+        if ( m_dirty )
+            DoDirtyProcessing();
+        else
+            Refresh();
     }
 }