]> git.saurik.com Git - wxWidgets.git/commitdiff
Event coordinates should _always_ be physical, not logical, to
authorJulian Smart <julian@anthemion.co.uk>
Sat, 19 Nov 2005 22:49:13 +0000 (22:49 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 19 Nov 2005 22:49:13 +0000 (22:49 +0000)
be consistent both with other events and with the wxMSW control

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 112fecc4d19cff427ae19e396e2fd0e20076878c..0daf721601d712f5c3b3b5b9b7b0c5deb16e2fc5 100644 (file)
@@ -3082,7 +3082,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
         wxTreeEvent nevent( command, GetId() );
         nevent.m_item = m_current;
         nevent.SetEventObject(this);
-        nevent.SetPoint(pt);
+        nevent.SetPoint(CalcScrolledPosition(pt));
 
         // by default the dragging is not supported, the user code must
         // explicitly allow the event for it to take place
@@ -3147,7 +3147,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
         wxTreeEvent eventEndDrag(wxEVT_COMMAND_TREE_END_DRAG, GetId());
 
         eventEndDrag.m_item = item;
-        eventEndDrag.m_pointDrag = pt;
+        eventEndDrag.m_pointDrag = CalcScrolledPosition(pt);
         eventEndDrag.SetEventObject(this);
 
         (void)GetEventHandler()->ProcessEvent(eventEndDrag);