Need to convert from physical to logical units inside HitTest

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-07-01 16:43:54 +00:00
parent 6fd54d582d
commit 563d25babe

View File

@@ -1628,7 +1628,11 @@ wxRichTextCtrl::HitTest(const wxPoint& pt,
wxClientDC dc((wxRichTextCtrl*) this);
((wxRichTextCtrl*)this)->PrepareDC(dc);
int hit = ((wxRichTextCtrl*)this)->GetBuffer().HitTest(dc, pt, *pos);
// Buffer uses logical position (relative to start of buffer)
// so convert
wxPoint pt2 = GetLogicalPoint(pt);
int hit = ((wxRichTextCtrl*)this)->GetBuffer().HitTest(dc, pt2, *pos);
switch ( hit )
{
@@ -2017,7 +2021,7 @@ bool wxRichTextCtrl::CanRedo() const
}
// ----------------------------------------------------------------------------
// implemenation details
// implementation details
// ----------------------------------------------------------------------------
void wxRichTextCtrl::Command(wxCommandEvent& event)