lcl: don't fire ColorDialog when TColorListBox ItemIndex was changed by LCL code

git-svn-id: trunk@17334 -
This commit is contained in:
paul 2008-11-11 04:43:02 +00:00
parent 7272ed2dee
commit 8277d0556e

View File

@ -835,10 +835,13 @@ end;
procedure TCustomColorListBox.DoSelectionChange(User: Boolean);
begin
if (cbCustomColor in Style) and (ItemIndex = 0) then // custom color has been selected
PickCustomColor;
if ItemIndex <> -1 then
FSelected := Colors[ItemIndex];
if User then
begin
if (cbCustomColor in Style) and (ItemIndex = 0) then // custom color has been selected
PickCustomColor;
if ItemIndex <> -1 then
FSelected := Colors[ItemIndex];
end;
inherited DoSelectionChange(User);
end;