Changeset 424 for trunk/Packages/Common/ULastOpenedList.pas
- Timestamp:
- Apr 25, 2022, 6:22:53 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/ULastOpenedList.pas
r423 r424 82 82 destructor TLastOpenedList.Destroy; 83 83 begin 84 Items.Free;84 FreeAndNil(Items); 85 85 inherited; 86 86 end; … … 92 92 begin 93 93 if Assigned(MenuItem) then begin 94 MenuItem.Clear; 94 while MenuItem.Count > Items.Count do 95 MenuItem.Delete(MenuItem.Count - 1); 96 while MenuItem.Count < Items.Count do begin 97 NewMenuItem := TMenuItem.Create(MenuItem); 98 MenuItem.Add(NewMenuItem); 99 end; 95 100 for I := 0 to Items.Count - 1 do begin 96 NewMenuItem := TMenuItem.Create(MenuItem); 97 NewMenuItem.Caption := Items[I]; 98 NewMenuItem.OnClick := ClickAction; 99 MenuItem.Add(NewMenuItem); 101 MenuItem.Items[I].Caption := Items[I]; 102 MenuItem.Items[I].OnClick := ClickAction; 100 103 end; 101 104 end;
Note:
See TracChangeset
for help on using the changeset viewer.