diff --git a/include/wx/dataview.h b/include/wx/dataview.h index ff88b73783..4af433f8f3 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -26,7 +26,7 @@ #if defined(__WXGTK20__) // for testing - // #define wxUSE_GENERICDATAVIEWCTRL 1 + #define wxUSE_GENERICDATAVIEWCTRL 1 #elif defined(__WXMAC__) #else #define wxUSE_GENERICDATAVIEWCTRL 1 diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index f9a90df680..dfc95dbb3f 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -499,7 +499,6 @@ public: return wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT); } - //void EnsureVisible( unsigned int row ); wxRect GetLineRect( unsigned int row ) const; //Some useful functions for row and item mapping @@ -2541,9 +2540,7 @@ unsigned int wxDataViewMainWindow::GetLastVisibleRow() &client_size.x, &client_size.y ); //we should deal with the pixel here - unsigned int row = (client_size.y)/m_lineHeight; - if( client_size.y % m_lineHeight < m_lineHeight/2 ) - row -= 1; + unsigned int row = ((client_size.y)/m_lineHeight) - 1; return wxMin( GetRowCount()-1, row ); }