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:
@@ -99,15 +99,15 @@ 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();
|
textRect.OffsetTo(B_ORIGIN);
|
||||||
textRect.OffsetTo(B_ORIGIN);
|
textRect.InsetBy(TEXT_INSET,TEXT_INSET);
|
||||||
textRect.InsetBy(TEXT_INSET,TEXT_INSET);
|
// the width comes from stylededit R5. TODO: find a better way
|
||||||
// the width comes from stylededit R5. TODO: find a better way
|
textRect.SetRightBottom(BPoint(1500.0,textRect.RightBottom().y));
|
||||||
textRect.SetRightBottom(BPoint(1500.0,textRect.RightBottom().y));
|
SetTextRect(textRect);
|
||||||
SetTextRect(textRect);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fEncoding != 0) {
|
if (fEncoding != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user