]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dataview.cpp
applied patch 1908782 wxAuiMDIChildFrame not removed from wxAuiMDIClientWindow
[wxWidgets.git] / src / mac / carbon / dataview.cpp
index c3ee3ab5c7893a9132a9a93dcf6c2f1fcfa8a459..99b593cdb93b90c9857e622f0e8d1fcad327ebb8 100644 (file)
@@ -174,13 +174,23 @@ static bool InitializeColumnDescription(DataBrowserListViewColumnDesc& columnDes
   } /* switch */
   columnDescription.headerBtnDesc.btnFontStyle.font  = kControlFontViewSystemFont;
   columnDescription.headerBtnDesc.btnFontStyle.style = normal;
-  columnDescription.headerBtnDesc.btnContentInfo.contentType = kControlContentIconRef;
-  if (columnPtr->GetBitmap().Ok())
+  if (columnPtr->GetBitmap().IsOk())
+  {
+    columnDescription.headerBtnDesc.btnContentInfo.contentType = kControlContentIconRef;
 #if wxCHECK_VERSION(2,9,0)
     columnDescription.headerBtnDesc.btnContentInfo.u.iconRef = columnPtr->GetBitmap().GetIconRef();
 #else
     columnDescription.headerBtnDesc.btnContentInfo.u.iconRef = columnPtr->GetBitmap().GetBitmapData()->GetIconRef();
 #endif
+  }
+  else
+  {
+    // not text only as we otherwise could not add a bitmap later
+    // columnDescription.headerBtnDesc.btnContentInfo.contentType = kControlContentTextOnly;
+    columnDescription.headerBtnDesc.btnContentInfo.contentType = kControlContentIconRef;
+    columnDescription.headerBtnDesc.btnContentInfo.u.iconRef = NULL;
+  }
+    
  // done:
   return true;
 } /* InitializeColumnDescription(DataBrowserListViewColumnDesc&, wxDataViewColumn const*, DataBrowserPropertyID, wxMacCFStringHolder const&) */