diff --git a/include/wx/dataview.h b/include/wx/dataview.h index be237cae1f..3f87c82485 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -26,6 +26,7 @@ #include "wx/weakref.h" #if !(defined(__WXGTK20__) || defined(__WXMAC__)) || defined(__WXUNIVERSAL__) +//#if !(defined(__WXMAC__)) || defined(__WXUNIVERSAL__) #define wxHAS_GENERIC_DATAVIEWCTRL #endif @@ -878,7 +879,7 @@ private: long m_min,m_max; }; -#ifndef __WXGTK20__ +#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(wxMAC) // ------------------------------------- // wxDataViewChoiceRenderer diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 34e2123b6c..47400107e1 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -1275,7 +1275,7 @@ bool wxDataViewSpinRenderer::GetValue( wxVariant &value ) const // wxDataViewChoiceRenderer // ------------------------------------- -#ifndef __WXGTK20__ +#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(wxMAC) wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString& choices, wxDataViewCellMode mode, int alignment ) : wxDataViewCustomRenderer(wxT("string"), mode, alignment ) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index deda154a48..3f3a3052cd 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2906,7 +2906,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) wxDataViewRenderer *cell = col->GetRenderer(); unsigned int current = GetLineAt( y ); - if ((current > GetRowCount()) || (x > GetEndOfLastCol())) + if ((current >= GetRowCount()) || (x > GetEndOfLastCol())) { // Unselect all if below the last row ? return;