patch from Mike Oliver <oliver@math.ucla.edu> to have correct position in wxTree/ListCtrl click events

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-11-16 13:38:56 +00:00
parent 2c99715a09
commit 05a7f61d90
2 changed files with 23 additions and 9 deletions

View File

@@ -2449,7 +2449,9 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, GetId());
nevent.m_item = (long) item;
nevent.m_code = 0;
nevent.m_pointDrag = wxPoint(x, y);
CalcScrolledPosition(x, y,
&nevent.m_pointDrag.x,
&nevent.m_pointDrag.y);
nevent.SetEventObject(this);
GetEventHandler()->ProcessEvent(nevent);
}
@@ -2502,7 +2504,9 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() );
nevent.m_item = (long) item;
nevent.m_code = 0;
nevent.m_pointDrag = wxPoint(x, y);
CalcScrolledPosition(x, y,
&nevent.m_pointDrag.x,
&nevent.m_pointDrag.y);
nevent.SetEventObject( this );
GetEventHandler()->ProcessEvent( nevent );
}