X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abfdefede3209ac777bdac8a65bae8bf008f327b..b39badac119fe944152cd1408a90b82e710ea598:/src/common/datavcmn.cpp diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 7c2f06f457..b7ee97b28e 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -673,7 +673,7 @@ wxDataViewRendererBase::~wxDataViewRendererBase() { } -const wxDataViewCtrl* wxDataViewRendererBase::GetView() const +wxDataViewCtrl* wxDataViewRendererBase::GetView() const { return const_cast(this)->GetOwner()->GetOwner(); } @@ -1094,6 +1094,16 @@ void wxDataViewCtrlBase::SetCurrentItem(const wxDataViewItem& item) Select(item); } +wxDataViewItem wxDataViewCtrlBase::GetSelection() const +{ + if ( GetSelectedItemsCount() != 1 ) + return wxDataViewItem(); + + wxDataViewItemArray selections; + GetSelections(selections); + return selections[0]; +} + wxDataViewColumn * wxDataViewCtrlBase::AppendTextColumn( const wxString &label, unsigned int model_column, wxDataViewCellMode mode, int width, wxAlignment align, int flags )