Bug in TDesignerWorkspace.MouseMove

edited January 2018 in FastReport VCL 5
Hi there
procedure TDesignerWorkspace.MouseMove(Shift: TShiftState; X, Y: Integer);
var
  i, px, py: Integer;
  c, cOver: TfrxComponent;
  ds: TfrxDataset;
  e, kx, ky: Extended;

  function Contain(cc: TfrxComponent): Boolean;
  begin
    Result := (X / FScale >= cc.Left) and (X / FScale <= cc.Left + cc.Width - 4) and
      (Y / FScale >= cc.AbsTop) and (Y / FScale <= !!!!c!!!!.AbsTop + cc.Height);
  end;
I encountered a bug while perusing the code of the TDesignerWorkspace object. In the Contains sub function the abstop is used of the global c variable and not the local cc parameter to calculate the contain. This doesn't really bug as prior to the call of contain c is made equal to cc but it would bug in another situation use.

Kind regards,
Paul Michael

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.