mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:48:03 +02:00
lcl: TCustomBitBtn: do not store Glyph when set by Action, issue #27358, from BBaz
git-svn-id: trunk@47523 -
This commit is contained in:
parent
7832ffec7f
commit
04725947e0
@ -100,10 +100,20 @@ begin
|
||||
end;
|
||||
|
||||
function TCustomBitBtn.IsGlyphStored: Boolean;
|
||||
var
|
||||
act: TCustomAction;
|
||||
begin
|
||||
Result := (Kind = bkCustom) and (FButtonGlyph.Glyph <> nil)
|
||||
and (not FButtonGlyph.Glyph.Empty)
|
||||
and (FButtonGlyph.Glyph.Width>0) and (FButtonGlyph.Glyph.Height>0);
|
||||
if Action <> nil then
|
||||
begin
|
||||
result := true;
|
||||
act := TCustomAction(Action);
|
||||
if (act.ActionList <> nil) and (act.ActionList.Images <> nil) and
|
||||
(act.ImageIndex >= 0) and (act.ImageIndex < act.ActionList.Images.Count) then
|
||||
result := false;
|
||||
end
|
||||
else Result := (Kind = bkCustom) and (FButtonGlyph.Glyph <> nil)
|
||||
and (not FButtonGlyph.Glyph.Empty)
|
||||
and (FButtonGlyph.Glyph.Width>0) and (FButtonGlyph.Glyph.Height>0);
|
||||
end;
|
||||
|
||||
procedure TCustomBitBtn.SetGlyph(AValue: TBitmap);
|
||||
|
Loading…
Reference in New Issue
Block a user