]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed wxOSX build.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Thu, 11 Aug 2011 00:39:18 +0000 (00:39 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Thu, 11 Aug 2011 00:39:18 +0000 (00:39 +0000)
Since r68621 dataview.cpp didn't compile anymore (at least with wxOSX-Carbon). Fixed by explicitly using wxDataViewItem's void * constructor in a few cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/dataview.cpp

index ff748471c213319136e043f7f89e6c1445d1eb73..2d316d9e0cb6e306cb2cb48d675b14faea68b250 100644 (file)
@@ -1756,7 +1756,7 @@ DataBrowserTrackingResult wxMacDataViewDataBrowserListViewControl::DataBrowserTr
   dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(GetWXPeer());
   wxCHECK_MSG(dataViewCtrlPtr != NULL,            false,_("Pointer to data view control not set correctly."));
   wxCHECK_MSG(dataViewCtrlPtr->GetModel() != NULL,false,_("Pointer to model not set correctly."));
-  dataViewCustomRendererItem = reinterpret_cast<void*>(itemID);
+  dataViewCustomRendererItem = wxDataViewItem(reinterpret_cast<void*>(itemID));
   wxCHECK_MSG(dataViewCustomRendererItem.IsOk(),kDataBrowserNothingHit,_("Invalid data view item"));
   dataViewColumnPtr = GetColumnPtr(propertyID);
   wxCHECK_MSG(dataViewColumnPtr != NULL,kDataBrowserNothingHit,_("No column existing."));
@@ -1814,8 +1814,11 @@ Boolean wxMacDataViewDataBrowserListViewControl::DataBrowserAcceptDragProc(DragR
     wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE,dataViewCtrlPtr->GetId());
 
     dataViewEvent.SetEventObject(dataViewCtrlPtr);
-    dataViewEvent.SetItem(reinterpret_cast<void*>(itemID)); // this is the item that receives the event
-                                                            // (can be an invalid item ID, this is especially useful if the dataview does not contain any items)
+
+    // this is the item that receives the event (can be an invalid item ID, this is
+    // especially useful if the dataview does not contain any items)
+    dataViewEvent.SetItem( wxDataViewItem(reinterpret_cast<void*>(itemID)) );
+
     dataViewEvent.SetModel(dataViewCtrlPtr->GetModel());
     dataViewEvent.SetDataObject(dataObjects);
     dataViewEvent.SetDataFormat(GetDnDDataFormat(dataObjects));
@@ -1848,7 +1851,7 @@ Boolean wxMacDataViewDataBrowserListViewControl::DataBrowserAddDragItemProc(Drag
   dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(GetWXPeer());
   wxCHECK_MSG(dataViewCtrlPtr != NULL,            false,_("Pointer to data view control not set correctly."));
   wxCHECK_MSG(dataViewCtrlPtr->GetModel() != NULL,false,_("Pointer to model not set correctly."));
-  dataViewItem = reinterpret_cast<void*>(itemID);
+  dataViewItem = wxDataViewItem(reinterpret_cast<void*>(itemID));
   wxCHECK_MSG(dataViewItem.IsOk(),false,_("Invalid data view item"));
 
  // send a begin drag event and proceed with dragging unless the event is vetoed:
@@ -1988,8 +1991,11 @@ Boolean wxMacDataViewDataBrowserListViewControl::DataBrowserReceiveDragProc(Drag
     wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_DROP,dataViewCtrlPtr->GetId());
 
     dataViewEvent.SetEventObject(dataViewCtrlPtr);
-    dataViewEvent.SetItem(reinterpret_cast<void*>(itemID)); // this is the item that receives the event
-                                                            // (can be an invalid item ID, this is especially useful if the dataview does not contain any items)
+
+    // this is the item that receives the event (can be an invalid item ID, this is
+    // especially useful if the dataview does not contain any items)
+    dataViewEvent.SetItem( wxDataViewItem(reinterpret_cast<void*>(itemID)) );
+
     dataViewEvent.SetModel(dataViewCtrlPtr->GetModel());
     dataViewEvent.SetDataObject(dataObjects);
     dataViewEvent.SetDataFormat(GetDnDDataFormat(dataObjects));