]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
fix compile bug with DMC
[wxWidgets.git] / 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)