Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
6315 00 JVCL Components trivial always 2014-08-18 08:20 2015-09-21 17:47
Arioch  
AHUser  
low  
resolved 3.47  
xe2 fixed  
none    
none 3.49  
0006315: double ( redundant ) calculation of ClientRect in TJvCheckBox.CalcAutoSize
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);
Issue History
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

Notes
(0021038)
obones   
2014-09-03 11:42   
Except that ClientRect might not have Left and Top set to 0
(0021062)
AHUser   
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.