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

View File

@ -99,15 +99,15 @@ StyledEditView::GetStyledText(BPositionIO * stream)
bytesRead = node->ReadAttr("wrap",0,0,&wrap,sizeof(wrap));
if (bytesRead > 0) {
SetWordWrap(wrap);
}
if (wrap == false) {
BRect textRect;
textRect = Bounds();
textRect.OffsetTo(B_ORIGIN);
textRect.InsetBy(TEXT_INSET,TEXT_INSET);
// the width comes from stylededit R5. TODO: find a better way
textRect.SetRightBottom(BPoint(1500.0,textRect.RightBottom().y));
SetTextRect(textRect);
if (wrap == false) {
BRect textRect;
textRect = Bounds();
textRect.OffsetTo(B_ORIGIN);
textRect.InsetBy(TEXT_INSET,TEXT_INSET);
// the width comes from stylededit R5. TODO: find a better way
textRect.SetRightBottom(BPoint(1500.0,textRect.RightBottom().y));
SetTextRect(textRect);
}
}
}
if (fEncoding != 0) {