mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 01:57:57 +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
|
||||
s:='$'+fTransferMacros[i].Name+'()';
|
||||
ALine := MemoParameters.CaretPos.Y;
|
||||
If MemoParameters.Lines.Count = 0 Then
|
||||
if ALine >= MemoParameters.Lines.Count then
|
||||
MemoParameters.Lines.Add('');
|
||||
AStr := MemoParameters.Lines[Aline];
|
||||
MemoParameters.Lines[Aline] := AStr + s;
|
||||
|
@ -428,12 +428,13 @@ begin
|
||||
|
||||
// simplified because of issue #29670
|
||||
// allow insert invalid index like others do
|
||||
if Index >= FStringlist.Count then
|
||||
if Index >= FStringList.Count then
|
||||
Index := FStringList.Add(S)
|
||||
else
|
||||
FStringList.Insert(Index, S);
|
||||
W := GetUTF8String(S);
|
||||
TQtTextEdit(FOwner.Handle).insertLine(Index, W);
|
||||
FTextChanged := False; // FStringList is already updated, no need to update from WS.
|
||||
end;
|
||||
|
||||
procedure TQtMemoStrings.LoadFromFile(const FileName: string);
|
||||
|
Loading…
Reference in New Issue
Block a user