mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 00:40:18 +02:00
Qt: allow pass of change events to LCL when inserting or appending text into TCustomMemo.issue #18419
git-svn-id: trunk@29062 -
This commit is contained in:
parent
378ac9c3b4
commit
743dd68949
@ -264,9 +264,7 @@ begin
|
||||
if FTextChanged then InternalUpdate;
|
||||
FStringList[Index] := S;
|
||||
W := GetUTF8String(S);
|
||||
TQtTextEdit(FOwner.Handle).BeginUpdate;
|
||||
TQtTextEdit(FOwner.Handle).setLineText(Index, W);
|
||||
TQtTextEdit(FOwner.Handle).EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TQtMemoStrings.SetTextStr(const Value: string);
|
||||
@ -385,9 +383,7 @@ begin
|
||||
writeln('TQtMemoStrings.Delete');
|
||||
{$endif}
|
||||
FStringList.Delete(Index);
|
||||
TQtTextEdit(FOwner.Handle).BeginUpdate;
|
||||
TQtTextEdit(FOwner.Handle).RemoveLine(Index);
|
||||
TQtTextEdit(FOwner.Handle).EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -418,22 +414,18 @@ begin
|
||||
begin
|
||||
// workaround for qt richtext parser bug
|
||||
W := GetUTF8String(S);
|
||||
TQtTextEdit(FOwner.Handle).BeginUpdate;
|
||||
TQtTextEdit(FOwner.Handle).insertLine(Index, W);
|
||||
TQtTextEdit(FOwner.Handle).EndUpdate;
|
||||
end else
|
||||
begin
|
||||
// append is much faster in case when we add strings
|
||||
W := S;
|
||||
ExternalUpdate(W, False, True);
|
||||
ExternalUpdate(W, False, False);
|
||||
FTextChanged := False;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
W := GetUTF8String(S);
|
||||
TQtTextEdit(FOwner.Handle).BeginUpdate;
|
||||
TQtTextEdit(FOwner.Handle).insertLine(Index, W);
|
||||
TQtTextEdit(FOwner.Handle).EndUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user