From c33f56042745a9654939bce362ba7416a60879fe Mon Sep 17 00:00:00 2001 From: shatty Date: Thu, 29 Jul 2004 03:31:25 +0000 Subject: [PATCH] fix word wrap at file open time bug git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8495 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/stylededit/StyledEditView.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/apps/stylededit/StyledEditView.cpp b/src/apps/stylededit/StyledEditView.cpp index c53623bbad..c68ec9a455 100644 --- a/src/apps/stylededit/StyledEditView.cpp +++ b/src/apps/stylededit/StyledEditView.cpp @@ -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) {