]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datavcmn.cpp
make sure svn info for an already existing .xcodeproj folder is not deleted, replace...
[wxWidgets.git] / src / common / datavcmn.cpp
index 7c2f06f45733cac0648d05eb7918890c0e007d93..b7ee97b28e21a64cc21db08f56081e2f6342c863 100644 (file)
@@ -673,7 +673,7 @@ wxDataViewRendererBase::~wxDataViewRendererBase()
 {
 }
 
-const wxDataViewCtrl* wxDataViewRendererBase::GetView() const
+wxDataViewCtrl* wxDataViewRendererBase::GetView() const
 {
     return const_cast<wxDataViewRendererBase*>(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 )