mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 18:30:44 +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;
|
end;
|
||||||
|
|
||||||
function TCustomBitBtn.IsGlyphStored: Boolean;
|
function TCustomBitBtn.IsGlyphStored: Boolean;
|
||||||
|
var
|
||||||
|
act: TCustomAction;
|
||||||
begin
|
begin
|
||||||
Result := (Kind = bkCustom) and (FButtonGlyph.Glyph <> nil)
|
if Action <> nil then
|
||||||
and (not FButtonGlyph.Glyph.Empty)
|
begin
|
||||||
and (FButtonGlyph.Glyph.Width>0) and (FButtonGlyph.Glyph.Height>0);
|
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;
|
end;
|
||||||
|
|
||||||
procedure TCustomBitBtn.SetGlyph(AValue: TBitmap);
|
procedure TCustomBitBtn.SetGlyph(AValue: TBitmap);
|
||||||
|
Loading…
Reference in New Issue
Block a user