Commit 7d90e95e authored by Juha Manninen's avatar Juha Manninen
Browse files

LCL: Propogate TAction.ImageIndex to TSpeedButton.ImageIndex. Issue #38135,...

LCL: Propogate TAction.ImageIndex to TSpeedButton.ImageIndex. Issue #38135, patch from Anton Kavalenka.

git-svn-id: trunk@64165 -
parent 477d5362
......@@ -290,9 +290,11 @@ type
procedure AssignClient(AClient: TObject); override;
procedure SetGroupIndex(Value: Integer); override;
procedure SetChecked(Value: Boolean); override;
procedure SetImageIndex(Value: Integer); override;
public
function IsCheckedLinked: Boolean; override;
function IsGroupIndexLinked: Boolean; override;
function IsImageIndexLinked: Boolean; override;
end;
{ TCustomSpeedButton }
......
......@@ -1224,6 +1224,12 @@ begin
(SpeedButton.GroupIndex = (Action as TCustomAction).GroupIndex);
end;
function TSpeedButtonActionLink.IsImageIndexLinked: Boolean;
begin
Result := inherited IsImageIndexLinked and
(TSpeedButton(FClient).ImageIndex = (Action as TCustomAction).ImageIndex);
end;
procedure TSpeedButtonActionLink.SetGroupIndex(Value: Integer);
begin
if IsGroupIndexLinked then TCustomSpeedButton(FClient).GroupIndex := Value;
......@@ -1234,6 +1240,12 @@ begin
if IsCheckedLinked then TCustomSpeedButton(FClient).Down := Value;
end;
procedure TSpeedButtonActionLink.SetImageIndex(Value: Integer);
begin
if IsImageIndexLinked then
TSpeedButton(FClient).ImageIndex := Value;
end;
{$IFDEF ASSERT_IS_ON}
{$UNDEF ASSERT_IS_ON}
......
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