]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectrl.cpp
added the makefile for tex2rtf compilation using configure, fixed compilation
[wxWidgets.git] / src / generic / treectrl.cpp
index edfceee22510faac3b9bebe825105b8b96753d04..95744550b790cc7d7db98a9f0b82f8306f09c333 100644 (file)
@@ -1901,7 +1901,7 @@ void wxTreeCtrl::OnRenameAccept()
 
 void wxTreeCtrl::OnMouse( wxMouseEvent &event )
 {
-    if ( !(event.LeftUp() || event.LeftDClick() || event.Dragging()) ) return;
+    if ( !(event.LeftUp() || event.RightDown() || event.LeftDClick() || event.Dragging()) ) return;
 
     if ( !m_anchor ) return;
 
@@ -1939,6 +1939,15 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
 
     if (item == NULL) return;  /* we hit the blank area */
 
+    if (event.RightDown()) { 
+       wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK,GetId());
+       nevent.m_item=item;
+       nevent.m_code=0;
+       nevent.SetEventObject(this);
+       GetEventHandler()->ProcessEvent(nevent);
+       return;
+    }
+
     if (event.LeftUp() && (item == m_current) &&
         (flags & wxTREE_HITTEST_ONITEMLABEL) &&
         HasFlag(wxTR_EDIT_LABELS) )