]> git.saurik.com Git - wxWidgets.git/commitdiff
Small code cleanup
authorJulian Smart <julian@anthemion.co.uk>
Tue, 23 Oct 2007 13:35:26 +0000 (13:35 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 23 Oct 2007 13:35:26 +0000 (13:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index f3247070def25c776b5e1da1c07cc05bc233cf68..bf1f301f10e6571d7de6c6acfc9cbaa6523d6c96 100644 (file)
@@ -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)