mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 16:10:14 +02:00
TCustomColorComboBox: trigger custom color dialog on OnCloseUp instead of OnChange.Patch by theo. issue #20924
git-svn-id: trunk@34337 -
This commit is contained in:
parent
494b78cea1
commit
ac028a407b
@ -66,7 +66,7 @@ type
|
||||
procedure Loaded; override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure DoGetColors; virtual;
|
||||
procedure Change; override;
|
||||
procedure CloseUp; override;
|
||||
function PickCustomColor: Boolean; virtual;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -613,13 +613,13 @@ begin
|
||||
OnGetColors(Self, Items)
|
||||
end;
|
||||
|
||||
procedure TCustomColorBox.Change;
|
||||
procedure TCustomColorBox.CloseUp;
|
||||
begin
|
||||
if (cbCustomColor in Style) and (ItemIndex = 0) then // custom color has been selected
|
||||
PickCustomColor;
|
||||
if ItemIndex <> -1 then
|
||||
FSelected := Colors[ItemIndex];
|
||||
inherited Change;
|
||||
inherited CloseUp;
|
||||
end;
|
||||
|
||||
function TCustomColorBox.PickCustomColor: Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user