You've already forked lazarus-ccr
richmemo: efficient way of setting attributes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4377 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -850,6 +850,16 @@ begin
|
||||
|
||||
if (ModifyMask = []) or (TextLength = 0) then Exit;
|
||||
|
||||
if TWSCustomRichMemoClass(WidgetSetClass).isInternalChange(Self, ModifyMask) then
|
||||
begin
|
||||
// more effecient from OS view
|
||||
TWSCustomRichMemoClass(WidgetSetClass).SetTextAttributesInternal(Self,
|
||||
TextStart, TextLength, ModifyMask, fnt);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
// manually looping from text ranges and re-applying
|
||||
// all the style. changing only the ones that in the mask
|
||||
i := TextStart;
|
||||
j := TextStart + TextLength;
|
||||
while i < j do begin
|
||||
|
||||
Reference in New Issue
Block a user