Take into account scrolling while obtaining absolute mouse pointer position
See #18313.
This commit is contained in:
@@ -5471,9 +5471,12 @@ bool wxPropertyGrid::OnMouseChildCommon( wxMouseEvent &event, int* px, int *py )
|
|||||||
int splitterX = GetSplitterPosition();
|
int splitterX = GetSplitterPosition();
|
||||||
|
|
||||||
wxRect r = topCtrlWnd->GetRect();
|
wxRect r = topCtrlWnd->GetRect();
|
||||||
|
int ux, uy;
|
||||||
|
CalcUnscrolledPosition(r.x + x, r.y + y, &ux, &uy);
|
||||||
|
|
||||||
if ( !m_dragStatus &&
|
if ( !m_dragStatus &&
|
||||||
x > (splitterX-r.x+wxPG_SPLITTERX_DETECTMARGIN2) &&
|
ux > (splitterX + wxPG_SPLITTERX_DETECTMARGIN2) &&
|
||||||
y >= 0 && y < r.height \
|
y >= 0 && y < r.height
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( m_curcursor != wxCURSOR_ARROW ) CustomSetCursor ( wxCURSOR_ARROW );
|
if ( m_curcursor != wxCURSOR_ARROW ) CustomSetCursor ( wxCURSOR_ARROW );
|
||||||
@@ -5481,8 +5484,14 @@ bool wxPropertyGrid::OnMouseChildCommon( wxMouseEvent &event, int* px, int *py )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CalcUnscrolledPosition( event.m_x + r.x, event.m_y + r.y, \
|
if ( px )
|
||||||
px, py );
|
{
|
||||||
|
*px = ux;
|
||||||
|
}
|
||||||
|
if ( py )
|
||||||
|
{
|
||||||
|
*py = uy;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user