View Issue Details

IDProjectCategoryView StatusLast Update
0006315JEDI VCL00 JVCL Componentspublic2015-09-21 17:47
ReporterAriochAssigned ToAHUser 
PrioritylowSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.47 
Target VersionFixed in Version3.49 
Summary0006315: double ( redundant ) calculation of ClientRect in TJvCheckBox.CalcAutoSize
Descriptionline 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);
TagsNo tags attached.

Activities

obones

2014-09-03 11:42

administrator   ~0021038

Except that ClientRect might not have Left and Top set to 0

AHUser

2014-10-01 11:01

developer   ~0021062

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