From: Vadim Zeitlin Date: Wed, 24 Nov 2010 00:42:19 +0000 (+0000) Subject: Skip mouse events outside of item area in wxDataViewCtrl. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/737883f20a97658d4d94f8dfbcf2062209c39a28?hp=63a6a75000ded502087a9e063569d1ce864951b9 Skip mouse events outside of item area in wxDataViewCtrl. Don't consume mouse events outside of the area occupied by the items in the generic implementation of wxDataViewCtrl as this prevented wxEVT_CONTEXT_MENU events from being generated. Closes #12706. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index df22e987ea..a8bd2239a7 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3469,13 +3469,17 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) xpos += c->GetWidth(); } if (!col) + { + event.Skip(); return; + } wxDataViewRenderer *cell = col->GetRenderer(); unsigned int current = GetLineAt( y ); if ((current >= GetRowCount()) || (x > GetEndOfLastCol())) { // Unselect all if below the last row ? + event.Skip(); return; }