mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 16:40:54 +02:00
LCL-QT: Prevent deleting an empty line from TQtMemoStrings after it is inserted. Fixes bug in ExtTool dialog. Issue #30929.
git-svn-id: trunk@53375 -
This commit is contained in:
parent
e2599966ce
commit
4261afaff7
@ -904,7 +904,7 @@ begin
|
|||||||
else
|
else
|
||||||
s:='$'+fTransferMacros[i].Name+'()';
|
s:='$'+fTransferMacros[i].Name+'()';
|
||||||
ALine := MemoParameters.CaretPos.Y;
|
ALine := MemoParameters.CaretPos.Y;
|
||||||
If MemoParameters.Lines.Count = 0 Then
|
if ALine >= MemoParameters.Lines.Count then
|
||||||
MemoParameters.Lines.Add('');
|
MemoParameters.Lines.Add('');
|
||||||
AStr := MemoParameters.Lines[Aline];
|
AStr := MemoParameters.Lines[Aline];
|
||||||
MemoParameters.Lines[Aline] := AStr + s;
|
MemoParameters.Lines[Aline] := AStr + s;
|
||||||
|
@ -428,12 +428,13 @@ begin
|
|||||||
|
|
||||||
// simplified because of issue #29670
|
// simplified because of issue #29670
|
||||||
// allow insert invalid index like others do
|
// allow insert invalid index like others do
|
||||||
if Index >= FStringlist.Count then
|
if Index >= FStringList.Count then
|
||||||
Index := FStringList.Add(S)
|
Index := FStringList.Add(S)
|
||||||
else
|
else
|
||||||
FStringList.Insert(Index, S);
|
FStringList.Insert(Index, S);
|
||||||
W := GetUTF8String(S);
|
W := GetUTF8String(S);
|
||||||
TQtTextEdit(FOwner.Handle).insertLine(Index, W);
|
TQtTextEdit(FOwner.Handle).insertLine(Index, W);
|
||||||
|
FTextChanged := False; // FStringList is already updated, no need to update from WS.
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtMemoStrings.LoadFromFile(const FileName: string);
|
procedure TQtMemoStrings.LoadFromFile(const FileName: string);
|
||||||
|
Loading…
Reference in New Issue
Block a user