Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006315 [JEDI VCL] 00 JVCL Components trivial always 2014-08-18 08:20 2015-09-21 17:47
Reporter Arioch View Status public  
Assigned To AHUser
Priority low Resolution fixed  
Status resolved   Product Version 3.47
Summary 0006315: double ( redundant ) calculation of ClientRect in TJvCheckBox.CalcAutoSize
Description line 382 in jvcl\run\JvCheckBox.pas

procedure TJvCheckBox.CalcAutoSize;
...
  R := Rect(0, 0, ClientWidth, ClientHeight);

......

Both CW and CH are implemented as returning one of GetClientRect members. So this method is called twice.

This whole line should be replaced with trivival

  R := ClientRect; // R := Rect(0, 0, ClientWidth, ClientHeight);
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0021038)
obones (administrator)
2014-09-03 11:42

Except that ClientRect might not have Left and Top set to 0
(0021062)
AHUser (developer)
2014-10-01 11:01

In case of TJvCheckBox GetClientRect uses the default implementation of TWinControl which is "Rect(0, 0, Width, Height)". So Left/Top are zero.

- Issue History
Date Modified Username Field Change
2014-08-18 08:20 Arioch New Issue
2014-09-03 11:42 obones Note Added: 0021038
2014-09-03 11:42 obones Status new => feedback
2014-10-01 11:01 AHUser Note Added: 0021062
2014-10-01 11:01 AHUser Status feedback => resolved
2014-10-01 11:01 AHUser Fixed in Version => Daily / GIT
2014-10-01 11:01 AHUser Resolution open => fixed
2014-10-01 11:01 AHUser Assigned To => AHUser
2015-09-21 17:47 obones Fixed in Version Daily / GIT => 3.49


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker