Commit 2ef47b38 authored by Bart B's avatar Bart B 🐞
Browse files

ColorListBox: use same logic for Style as TColorBox. Issue #27397.

git-svn-id: trunk@47583 -
parent f05054dd
......@@ -839,7 +839,9 @@ begin
begin
if not (cbStandardColors in Style) and (Index < StandardColorsCount) then
Exit;
if not (cbExtendedColors in Style) and (Index < StandardColorsCount + ExtendedColorCount) then
if not (cbExtendedColors in Style) and
(Index < StandardColorsCount + ExtendedColorCount) and
(Index >= StandardColorsCount) then
Exit;
end;
......@@ -920,7 +922,6 @@ begin
// we need to wait while we finish loading since we depend on style and OnGetColors event
if (csLoading in ComponentState) then
Exit;
OldSelected := FSelected;
with Items do
begin
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment