CharImgList images.PPI set to zero??

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #68624
    HeDiBo
    Participant

    This is an old bug, I think.
    In sCheckBox.pas there is this code:

    procedure TsCheckBox.DrawCheckArea;
    var
      i, ImgIndex, GlyphCount, GlyphIndex: integer;
      TempBmp: TBitmap;
      R: TRect;
    begin
      if Assigned(Images) and (FImgChecked >= 0) and (FImgUnChecked >= 0) then begin
    .
    .
    .
            Images.Draw(FCommonData.FCacheBmp.Canvas, R.Left, R.Top, ImgIndex, True);
          end;
          SetImagesPPI(Images, 0);          <<==== BIG TROUBLE!!
        end;

    The trouble is, that the imagelist may be used for numerous other purposes. In my case it is also used for images in a devexpress cxGrid. Suddenly the images there disappear, because PPI of the imagelist has been set to zero.
    After I dummied the offending statement, things went well again.

    You can imagine that finding this bug has cost me days.

    #68639
    Support
    Keymaster

    You are right, this is the error (will be fixed in the nearest release).
    Sorry for a trouble.

    #68743
    HeDiBo
    Participant

    Thanks 🍰
    Please, close this topic

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘CharImgList images.PPI set to zero??’ is closed to new replies.