Fixing #3040 (DeskCalcs textview showing wrong/multiple styles)
* fixed crash in StyleBuffer::SetStyleFromMode() if any of the given pointers is NULL (which is perfectly valid) * BTextView::SetFontAndColor() now syncs the null style before it sets the range, thus making sure that there is only one style if the view is not stylable git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30516 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1619,6 +1619,7 @@ BTextView::SetFontAndColor(int32 startOffset, int32 endOffset,
|
||||
endOffset = textLength;
|
||||
|
||||
// add the style to the style buffer
|
||||
fStyles->SyncNullStyle(startOffset);
|
||||
fStyles->SetStyleRange(startOffset, endOffset, fText->Length(),
|
||||
fontMode, &newFont, color);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user