Fixed a bad bug in WidthBuffer, which would make BTextView behave in a weird way.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9404 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3582,7 +3582,7 @@ BTextView::StyledWidth(int32 fromOffset, int32 length, float *outAscent,
|
||||
// Use _BWidthBuffer_ if possible
|
||||
if (sWidths != NULL) {
|
||||
LockWidthBuffer();
|
||||
result += sWidths->StringWidth(fText->Text(), fromOffset, numChars, font);
|
||||
result += sWidths->StringWidth(*fText, fromOffset, numChars, font);
|
||||
UnlockWidthBuffer();
|
||||
} else
|
||||
result += font->StringWidth(fText->Text() + fromOffset, numChars);
|
||||
|
||||
Reference in New Issue
Block a user