Small code cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-10-23 13:35:26 +00:00
parent a76c2f3715
commit 96d38a8a71

View File

@@ -1142,17 +1142,10 @@ bool wxRichTextCtrl::IsPositionVisible(long pos) const
startX = 0; startX = 0;
startY = startY * ppuY; startY = startY * ppuY;
int sx = 0, sy = 0;
GetVirtualSize(& sx, & sy);
sx = 0;
if (ppuY != 0)
sy = sy/ppuY;
wxRect rect = line->GetRect(); wxRect rect = line->GetRect();
wxSize clientSize = GetClientSize(); wxSize clientSize = GetClientSize();
return !(((rect.y + rect.height) > (clientSize.y + startY)) || rect.y < startY); return (rect.GetBottom() > startY) && (rect.GetTop() < (startY + clientSize.y));
} }
void wxRichTextCtrl::SetCaretPosition(long position, bool showAtLineStart) void wxRichTextCtrl::SetCaretPosition(long position, bool showAtLineStart)