fix word wrap at file open time bug

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8495 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty
2004-07-29 03:31:25 +00:00
parent 41e9b8c42a
commit c33f560427
+1 -1
View File
@@ -99,7 +99,6 @@ StyledEditView::GetStyledText(BPositionIO * stream)
bytesRead = node->ReadAttr("wrap",0,0,&wrap,sizeof(wrap)); bytesRead = node->ReadAttr("wrap",0,0,&wrap,sizeof(wrap));
if (bytesRead > 0) { if (bytesRead > 0) {
SetWordWrap(wrap); SetWordWrap(wrap);
}
if (wrap == false) { if (wrap == false) {
BRect textRect; BRect textRect;
textRect = Bounds(); textRect = Bounds();
@@ -110,6 +109,7 @@ StyledEditView::GetStyledText(BPositionIO * stream)
SetTextRect(textRect); SetTextRect(textRect);
} }
} }
}
if (fEncoding != 0) { if (fEncoding != 0) {
int32 length = stream->Seek(0,SEEK_END); int32 length = stream->Seek(0,SEEK_END);
text_run_array * run_array = RunArray(0,length); text_run_array * run_array = RunArray(0,length);