]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/dataview_osx.cpp
Fix UI in generic wxListCtrl when pressing cursor arrows while editing.
[wxWidgets.git] / src / osx / dataview_osx.cpp
index 490f6d9fd71626c9fcb203823739877f8fda21d9..2886e1793497dd6aea41d7155c358b3fffc60965 100644 (file)
@@ -20,6 +20,9 @@
     #include "wx/dcclient.h"
     #include "wx/icon.h"
 #endif
+#if wxOSX_USE_CARBON
+#include "wx/osx/carbon/dataview.h"
+#endif
 
 #include "wx/osx/core/dataview.h"
 #include "wx/osx/private.h"
@@ -706,12 +709,11 @@ void wxDataViewCtrl::OnMouse(wxMouseEvent& event)
 {
     event.Skip();
 
+#if wxOSX_USE_CARBON
     if (GetModel() == NULL)
         return;
 
-#if 0
-    // Doesn't compile anymore
-    wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(m_peer));
+    wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(GetPeer()));
 
     int NoOfChildren;
     wxDataViewItemArray items;
@@ -736,7 +738,7 @@ void wxDataViewCtrl::OnMouse(wxMouseEvent& event)
 
            Rect itemrect;
            ::GetDataBrowserItemPartBounds( MacDataViewListCtrlPtr->GetControlRef(),
-              reinterpret_cast<DataBrowserItemID>(firstChild.GetID()), column->GetPropertyID(),
+              reinterpret_cast<DataBrowserItemID>(firstChild.GetID()), column->GetNativeData()->GetPropertyID(),
               kDataBrowserPropertyEnclosingPart, &itemrect );
 
            if (abs( event.GetX() - itemrect.right) < 3)
@@ -750,7 +752,6 @@ void wxDataViewCtrl::OnMouse(wxMouseEvent& event)
        }
 
     }
-
     SetCursor( *wxSTANDARD_CURSOR );
 #endif
 }