mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:59:13 +02:00
lcl: call colorbox custom color dialog *before* firing Change event
git-svn-id: trunk@17629 -
This commit is contained in:
parent
7fad68ae28
commit
25088aa92b
@ -65,7 +65,7 @@ type
|
|||||||
procedure Loaded; override;
|
procedure Loaded; override;
|
||||||
procedure InitializeWnd; override;
|
procedure InitializeWnd; override;
|
||||||
procedure DoGetColors; dynamic;
|
procedure DoGetColors; dynamic;
|
||||||
procedure Select; override;
|
procedure Change; override;
|
||||||
function PickCustomColor: Boolean; virtual;
|
function PickCustomColor: Boolean; virtual;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -583,13 +583,13 @@ begin
|
|||||||
OnGetColors(Self, Items)
|
OnGetColors(Self, Items)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomColorBox.Select;
|
procedure TCustomColorBox.Change;
|
||||||
begin
|
begin
|
||||||
if (cbCustomColor in Style) and (ItemIndex = 0) then // custom color has been selected
|
if (cbCustomColor in Style) and (ItemIndex = 0) then // custom color has been selected
|
||||||
PickCustomColor;
|
PickCustomColor;
|
||||||
if ItemIndex <> -1 then
|
if ItemIndex <> -1 then
|
||||||
FSelected := Colors[ItemIndex];
|
FSelected := Colors[ItemIndex];
|
||||||
inherited Select;
|
inherited Change;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomColorBox.PickCustomColor: Boolean;
|
function TCustomColorBox.PickCustomColor: Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user