Resets scroll position on load
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1949,6 +1949,8 @@ bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& WXUNUSED(range),
|
||||
/// Lay the item out
|
||||
bool wxRichTextParagraph::Layout(wxDC& dc, const wxRect& rect, int style)
|
||||
{
|
||||
// ClearLines();
|
||||
|
||||
// Increase the size of the paragraph due to spacing
|
||||
int spaceBeforePara = ConvertTenthsMMToPixels(dc, GetAttributes().GetParagraphSpacingBefore());
|
||||
int spaceAfterPara = ConvertTenthsMMToPixels(dc, GetAttributes().GetParagraphSpacingAfter());
|
||||
@@ -4859,13 +4861,16 @@ bool wxRichTextPlainTextHandler::DoLoadFile(wxRichTextBuffer *buffer, wxInputStr
|
||||
{
|
||||
int ch = stream.GetC();
|
||||
|
||||
if (ch == 10 && lastCh != 13)
|
||||
str += wxT('\n');
|
||||
|
||||
if (ch > 0 && ch != 10)
|
||||
str += wxChar(ch);
|
||||
|
||||
lastCh = ch;
|
||||
if (!stream.Eof())
|
||||
{
|
||||
if (ch == 10 && lastCh != 13)
|
||||
str += wxT('\n');
|
||||
|
||||
if (ch > 0 && ch != 10)
|
||||
str += wxChar(ch);
|
||||
|
||||
lastCh = ch;
|
||||
}
|
||||
}
|
||||
|
||||
buffer->Clear();
|
||||
|
Reference in New Issue
Block a user