mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 23:08:05 +02:00
fixed TWin32ListStringList.Assign (issue #1750)
git-svn-id: trunk@8798 -
This commit is contained in:
parent
d1d5e5a349
commit
69498e8919
@ -133,17 +133,22 @@ End;
|
||||
------------------------------------------------------------------------------}
|
||||
Procedure TWin32ListStringList.Assign(Source: TPersistent);
|
||||
Var
|
||||
S: TStrings;
|
||||
Counter: Integer;
|
||||
AnIndex: Integer;
|
||||
Begin
|
||||
{ Do not call inherited Assign as it does things we do not want to happen }
|
||||
If Source Is TStrings Then
|
||||
Begin
|
||||
S:= TStrings(Source);
|
||||
QuoteChar:=S.QuoteChar;
|
||||
Delimiter:=S.Delimiter;
|
||||
NameValueSeparator:=S.NameValueSeparator;
|
||||
Windows.SendMessage(FWin32List, FFlagResetContent, 0, 0);
|
||||
For Counter := 0 To (TStrings(Source).Count - 1) Do
|
||||
Begin
|
||||
AnIndex := Windows.SendMessage(FWin32List, FFlagAddString, 0, LPARAM(PChar(TStrings(Source)[Counter]))); //Insert
|
||||
PutObject(AnIndex, TStrings(Source).Objects[Counter]);
|
||||
AnIndex := Windows.SendMessage(FWin32List, FFlagAddString, 0, LPARAM(PChar(S[Counter]))); //Insert
|
||||
PutObject(AnIndex, S.Objects[Counter]);
|
||||
end;
|
||||
End
|
||||
Else
|
||||
|
Loading…
Reference in New Issue
Block a user