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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user