View Issue Details

IDProjectCategoryView StatusLast Update
0035525LazarusLCLpublic2020-06-05 03:26
ReporterDon Siders Assigned Towp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWin32OSWindows 
Product Version2.1 (SVN) 
Summary0035525: TCustomImageList does not reset FHasOverlays in ClearOverlays
DescriptionTCustomImageList does not reset the FHasOverlays member when ClearOverlays is called. The value is out of sync with the FOverlays array until Overlay() is called.

Patch attached.
TagsNo tags attached.
Fixed in Revision63290
LazTarget2.0.10
Widgetset
Attached Files

Activities

Don Siders

2019-05-06 04:01

reporter  

imglist.inc.diff (344 bytes)   
Index: imglist.inc
===================================================================
--- imglist.inc	(revision 61162)
+++ imglist.inc	(working copy)
@@ -1965,6 +1965,7 @@
 begin
   for I := Low(TOverlay) to High(TOverlay) do
     FOverlays[I] := -1;
+  FHasOverlays := False;
 end;
 
 procedure TCustomImageList.CreateDefaultResolution;
imglist.inc.diff (344 bytes)   

Don Siders

2020-06-01 00:52

reporter   ~0123157

This has been open for over a year, with no feedback, Just close it,

wp

2020-06-01 12:17

developer   ~0123162

Why should it be closed? It probably only has been overlooked.

Your description looks very reasonable, but still I would like to ask you to attach a little demo in which I can reproduce the issue, and I'll take care of the report.

Wouldn't it be better to replace FHasOverlays by a getter function which extracts the information from the FOverlays array? This way the property HasOverlays would always be in sync with the contents of FOverlays.

wp

2020-06-04 22:30

developer   ~0123231

Added demo: click "Clear overlays" --> overlay image is no longer displayed, but label still has the text "Has overlays: true".

wp

2020-06-04 22:35

developer   ~0123232

Applied the patch. Please test and close if ok.

Don Siders

2020-06-05 03:26

reporter   ~0123238

Testing with the demo you provided (Thanks for that), Works as expected.

Issue History

Date Modified Username Field Change
2019-05-06 04:01 Don Siders New Issue
2019-05-06 04:01 Don Siders File Added: imglist.inc.diff
2020-06-01 00:52 Don Siders Note Added: 0123157
2020-06-01 12:17 wp Note Added: 0123162
2020-06-01 12:17 wp Assigned To => wp
2020-06-01 12:17 wp Status new => feedback
2020-06-01 12:17 wp LazTarget => -
2020-06-04 22:30 wp Note Added: 0123231
2020-06-04 22:30 wp File Added: 35525 - ImageList Overlay.zip
2020-06-04 22:30 wp Status feedback => confirmed
2020-06-04 22:35 wp Status confirmed => resolved
2020-06-04 22:35 wp Resolution open => fixed
2020-06-04 22:35 wp Fixed in Revision => 63290
2020-06-04 22:35 wp LazTarget - => 2.0.10
2020-06-04 22:35 wp Note Added: 0123232
2020-06-05 03:26 Don Siders Note Added: 0123238
2020-06-05 03:26 Don Siders Status resolved => closed