]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
pragma , precomp support
[wxWidgets.git] / src / generic / treectlg.cpp
index 432f8f71d33c99f1e4ac58de0e8514fc56b74a05..89df6f6b1954038a6c6f6243cbcb9bb978c1ef38 100644 (file)
@@ -3177,11 +3177,12 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
 
         if ( event.RightDown() )
         {
+            DoSelectItem(item, true, false);
             wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, GetId());
             nevent.m_item = item;
             nevent.m_pointDrag = CalcScrolledPosition(pt);
             nevent.SetEventObject(this);
-            GetEventHandler()->ProcessEvent(nevent);
+            event.Skip(!GetEventHandler()->ProcessEvent(nevent));
         }
         else if ( event.LeftUp() )
         {