View Issue Details

IDProjectCategoryView StatusLast Update
0005126JEDI VCL00 JVCL Componentspublic2011-06-10 16:10
ReportercechetoAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.33 
Target VersionFixed in Version3.40 
Summary0005126: TThumbnailView.AddFromStream doen not sort correctly the thumbnails
DescriptionWhen inserting images in TThumbnailView using the AddFromStream method the fThumbnailList object sorts the thumbnails by title but does not realing the thumnail. This produces the view to be in an inconsistent order with the list an affects the thumbnail selection.
 
Additional InformationIt can be solved by adding "Reposition(Result);" after the "CalculateSize;" so it looks like:

function TJvThumbView.AddFromStream(AStream: TStream; AType: TGRFKind; aTitle : String): Integer;
var
  Thb: TJvThumbnail;
begin
  Thb := TJvThumbnail.Create(Self);
  Thb.StreamFileType := AType;
  Thb.Left := CalculateXPos(Count + 1);
  Thb.Top := CalculateYPos(Count + 1);
  Thb.Width := FThumbSize.X;
  Thb.Height := FThumbSize.Y;
  Thb.OnClick := OnClick;
  Thb.Photo.OnClick := OnClick;
  Thb.OnDblClick := OnDblClick;
  Thb.Title := aTitle;
  Thb.Photo.OnDblClick := OnDblClick;
  // Thb.Buffer := Vbuffer;
  Thb.Photo.LoadFromStream(AStream, Thb.StreamFileType);
  Result := FThumbList.AddObject(Thb.Title, Thb);
  InsertControl(Thb);
  CalculateSize;
  Reposition(Result);
end;

TagsNo tags attached.

Activities

obones

2010-03-08 15:25

administrator   ~0017242

Please provide the zipped sources of a sample application showing this

AHUser

2010-05-16 15:59

developer   ~0017397

Fixed in SVN revision 12775

Issue History

Date Modified Username Field Change
2010-01-24 15:14 cecheto New Issue
2010-03-08 15:25 obones Note Added: 0017242
2010-03-08 15:25 obones Status new => feedback
2010-05-16 15:59 AHUser Note Added: 0017397
2010-05-16 15:59 AHUser Status feedback => resolved
2010-05-16 15:59 AHUser Fixed in Version => Daily / SVN
2010-05-16 15:59 AHUser Resolution open => fixed
2010-05-16 15:59 AHUser Assigned To => AHUser
2011-06-10 16:10 obones Fixed in Version Daily / SVN => 3.40