Fixes #10247: wxDataViewCtrl - event is generated when clicking on a non existing row
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include "wx/weakref.h"
|
#include "wx/weakref.h"
|
||||||
|
|
||||||
#if !(defined(__WXGTK20__) || defined(__WXMAC__)) || defined(__WXUNIVERSAL__)
|
#if !(defined(__WXGTK20__) || defined(__WXMAC__)) || defined(__WXUNIVERSAL__)
|
||||||
|
//#if !(defined(__WXMAC__)) || defined(__WXUNIVERSAL__)
|
||||||
#define wxHAS_GENERIC_DATAVIEWCTRL
|
#define wxHAS_GENERIC_DATAVIEWCTRL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -878,7 +879,7 @@ private:
|
|||||||
long m_min,m_max;
|
long m_min,m_max;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef __WXGTK20__
|
#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(wxMAC)
|
||||||
|
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
// wxDataViewChoiceRenderer
|
// wxDataViewChoiceRenderer
|
||||||
|
@@ -1275,7 +1275,7 @@ bool wxDataViewSpinRenderer::GetValue( wxVariant &value ) const
|
|||||||
// wxDataViewChoiceRenderer
|
// wxDataViewChoiceRenderer
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|
||||||
#ifndef __WXGTK20__
|
#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(wxMAC)
|
||||||
|
|
||||||
wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString& choices, wxDataViewCellMode mode, int alignment ) :
|
wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString& choices, wxDataViewCellMode mode, int alignment ) :
|
||||||
wxDataViewCustomRenderer(wxT("string"), mode, alignment )
|
wxDataViewCustomRenderer(wxT("string"), mode, alignment )
|
||||||
|
@@ -2906,7 +2906,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
|
|
||||||
wxDataViewRenderer *cell = col->GetRenderer();
|
wxDataViewRenderer *cell = col->GetRenderer();
|
||||||
unsigned int current = GetLineAt( y );
|
unsigned int current = GetLineAt( y );
|
||||||
if ((current > GetRowCount()) || (x > GetEndOfLastCol()))
|
if ((current >= GetRowCount()) || (x > GetEndOfLastCol()))
|
||||||
{
|
{
|
||||||
// Unselect all if below the last row ?
|
// Unselect all if below the last row ?
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user