From: Julian Smart Date: Tue, 23 Oct 2007 13:35:26 +0000 (+0000) Subject: Small code cleanup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/96d38a8a71955c5d7f89299b58522557331e450a Small code cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index f3247070de..bf1f301f10 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -1142,17 +1142,10 @@ bool wxRichTextCtrl::IsPositionVisible(long pos) const startX = 0; startY = startY * ppuY; - int sx = 0, sy = 0; - GetVirtualSize(& sx, & sy); - sx = 0; - if (ppuY != 0) - sy = sy/ppuY; - wxRect rect = line->GetRect(); - 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)