mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 08:28:14 +02:00
LCL, fix first typed character in dbmemo under GTK, issue #37123
git-svn-id: trunk@64453 -
This commit is contained in:
parent
b1a7028cfe
commit
1fceb1f301
@ -243,10 +243,17 @@ begin
|
||||
end;
|
||||
|
||||
procedure TGtk2MemoStrings.SetTextStr(const Value: string);
|
||||
var
|
||||
aText: string;
|
||||
begin
|
||||
QueueCursorMove(0);
|
||||
QueueSelectLength(0);
|
||||
if (Value <> '') and (Text <> '') then
|
||||
aText := Text;
|
||||
// don't queue cursor movement if both old and new text are emtpy
|
||||
if (aText<>'') or (Value<>'') then
|
||||
begin
|
||||
QueueCursorMove(0);
|
||||
QueueSelectLength(0);
|
||||
end;
|
||||
if (Value <> '') and (aText <> '') then
|
||||
LockOnChange({%H-}PGtkObject(Owner.Handle), 1);
|
||||
gtk_text_buffer_set_text(FGtkBuf, PChar(Value), -1);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user