slight simplification of coords translation code in GetBoundingRect()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2909,11 +2909,7 @@ bool wxGenericTreeCtrl::GetBoundingRect(const wxTreeItemId& item,
|
|||||||
rect.height = GetLineHeight(i);
|
rect.height = GetLineHeight(i);
|
||||||
|
|
||||||
// we have to return the logical coordinates, not physical ones
|
// we have to return the logical coordinates, not physical ones
|
||||||
int startX, startY;
|
rect.SetTopLeft(CalcScrolledPosition(rect.GetTopLeft()));
|
||||||
GetViewStart(& startX, & startY);
|
|
||||||
|
|
||||||
rect.x -= startX*PIXELS_PER_UNIT;
|
|
||||||
rect.y -= startY*PIXELS_PER_UNIT;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user