X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/450b43059a92ea9965f2dd5575467fedfa3dbd16..beee38cb41aa2ce4fbe9052bf4f70e1be184b553:/src/osx/dataview_osx.cpp?ds=sidebyside diff --git a/src/osx/dataview_osx.cpp b/src/osx/dataview_osx.cpp index 6a15bd3aeb..490f6d9fd7 100644 --- a/src/osx/dataview_osx.cpp +++ b/src/osx/dataview_osx.cpp @@ -351,7 +351,6 @@ void wxDataViewCtrl::Init() { m_CustomRendererPtr = NULL; m_Deleting = false; - m_macIsUserPane = false; m_cgContext = NULL; } @@ -363,9 +362,10 @@ bool wxDataViewCtrl::Create(wxWindow *parent, const wxValidator& validator, const wxString& name) { + DontCreatePeer(); if (!(wxControl::Create(parent,id,pos,size,style,validator,name))) return false; - m_peer = ::CreateDataView(this,parent,id,pos,size,style,GetExtraStyle()); + SetPeer(::CreateDataView(this,parent,id,pos,size,style,GetExtraStyle())); MacPostControlCreate(pos,size); @@ -535,15 +535,9 @@ wxRect wxDataViewCtrl::GetItemRect(wxDataViewItem const& item, wxDataViewColumn return wxRect(); } -wxDataViewItem wxDataViewCtrl::GetSelection() const +int wxDataViewCtrl::GetSelectedItemsCount() const { - wxDataViewItemArray itemIDs; - - - if (GetDataViewPeer()->GetSelections(itemIDs) > 0) - return itemIDs[0]; - else - return wxDataViewItem(); + return GetDataViewPeer()->GetSelectedItemsCount(); } int wxDataViewCtrl::GetSelections(wxDataViewItemArray& sel) const @@ -633,6 +627,11 @@ void wxDataViewCtrl::AddChildren(wxDataViewItem const& parentItem) (void) GetModel()->ItemsAdded(parentItem,items); } +void wxDataViewCtrl::StartEditor( const wxDataViewItem & item, unsigned int column ) +{ + GetDataViewPeer()->StartEditor(item, column); +} + void wxDataViewCtrl::FinishCustomItemEditing() { if (GetCustomRendererItem().IsOk())