diff --git a/lcl/include/bitbtn.inc b/lcl/include/bitbtn.inc index 76ec61b82d..502a1c012d 100644 --- a/lcl/include/bitbtn.inc +++ b/lcl/include/bitbtn.inc @@ -203,23 +203,16 @@ procedure TCustomBitBtn.ActionChange(Sender: TObject; CheckDefaults: Boolean); var NewAct: TCustomAction; Imgs: TCustomImageList; - ImgRes: TScaledImageListResolution; begin inherited ActionChange(Sender,CheckDefaults); if Sender is TCustomAction then begin NewAct := TCustomAction(Sender); - //DebugLn(['TCustomBitBtn.ActionChange: Glyph.Empty=', Glyph.Empty, - // ', Action=', NewAct.Caption, - // ', ActionList=', NewAct.ActionList, - // ', Images=', NewAct.ActionList.Images, - // ', ImageIndex=', NewAct.ImageIndex ]); if (NewAct.ActionList = nil) or (NewAct.ImageIndex < 0) then Exit; Imgs := NewAct.ActionList.Images; if (Imgs = nil) or (NewAct.ImageIndex >= Imgs.Count) then Exit; - //DebugLn([' TCustomBitBtn.ActionChange: Setting image, ImageWidth=', ImageWidth]); - ImgRes := Imgs.ResolutionForPPI[ImageWidth,Font.PixelsPerInch,GetCanvasScaleFactor]; - ImgRes.GetBitmap(NewAct.ImageIndex, Glyph); + Images := Imgs; + ImageIndex := NewAct.ImageIndex; end; end;