]> git.saurik.com Git - wxWidgets.git/commitdiff
Skip mouse events outside of item area in wxDataViewCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Nov 2010 00:42:19 +0000 (00:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Nov 2010 00:42:19 +0000 (00:42 +0000)
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

src/generic/datavgen.cpp

index df22e987ea674fd5dc218b2101a1c75ca134039a..a8bd2239a7cd6f6a98d97cee39beeeb5fd42d5cb 100644 (file)
@@ -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;
     }