Changeset 336 for trunk/ItemList.pas
- Timestamp:
- Sep 7, 2024, 10:29:16 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ItemList.pas
r334 r336 79 79 private 80 80 procedure RecalculateNewId(Reset: Boolean); 81 procedure RecalculateItemsId; 81 82 public 82 83 NewId: Integer; … … 147 148 for I := 0 to Count - 1 do 148 149 TItem(Items[I]).Assign(Source.Items[I]); 149 RecalculateNewId(True);150 150 end; 151 151 … … 176 176 Node2 := Node2.NextSibling; 177 177 end; 178 RecalculateNewId(True);179 178 end; 180 179 … … 184 183 NewNode2: TDOMNode; 185 184 begin 185 RecalculateItemsId; 186 186 for I := 0 to Count - 1 do 187 187 with TItem(Items[I]) do begin … … 207 207 NewId := Max(NewId, Id + 1); 208 208 end; 209 end; 210 211 procedure TItemList.RecalculateItemsId; 212 var 213 I: Integer; 214 begin 215 for I := 0 to Count - 1 do 216 Items[I].Id := I + 1; 217 NewId := Count + 1; 209 218 end; 210 219
Note:
See TracChangeset
for help on using the changeset viewer.