lcl: don't add lineending after the last line in TListBox.GetSelectedText (bug #0012839)

git-svn-id: trunk@18097 -
This commit is contained in:
paul 2009-01-04 09:33:40 +00:00
parent 342531bc74
commit 93a355923e

View File

@ -671,9 +671,14 @@ var
i: Integer;
begin
Result := '';
if ItemIndex<0 then exit;
if ItemIndex < 0 then
Exit;
for i := 0 to Items.Count - 1 do
if Selected[i] then Result:=Result+Items[i]+LineEnding;
if Selected[i] then
if Result = '' then
Result := Items[i]
else
Result := Result + LineEnding + Items[i]
end;
{------------------------------------------------------------------------------