Fix for #11647: text from WriteText not scrolled to be visible in wxRichTextCtrl

IsPositionVisible was incorrect.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2011-02-25 17:28:27 +00:00
parent 28e27c3475
commit 1437c7fba6

View File

@@ -1568,7 +1568,7 @@ bool wxRichTextCtrl::IsPositionVisible(long pos) const
wxSize clientSize = GetClientSize();
clientSize.y -= GetBuffer().GetBottomMargin();
return (rect.GetBottom() > (startY + GetBuffer().GetTopMargin())) && (rect.GetTop() < (startY + clientSize.y));
return (rect.GetTop() >= (startY + GetBuffer().GetTopMargin())) && (rect.GetBottom() <= (startY + clientSize.y));
}
void wxRichTextCtrl::SetCaretPosition(long position, bool showAtLineStart)