Notifications
Clear all

[Closed] listview duplicate objects

I have a dotnet listview setup so user can add scene objects and am trying to figure out how to remove duplicates. Any ideas on how to go about doing this?

1 Reply
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

there are some ways which i’m using according to task and situation.
#1. Set list item’s name as node’s inode handle (which is unique for every scene’s node) and check item by key before adding a new one:
lvitem.name = node.inode.handle as string
#2. Use list item’s tag assigning real scene node to it:
lvitem.tag = dotnetmxsvalue node
#3. Use combination of #1 and #2. Use #1 for the fast searching, and use #2 for the double-checking

#1 is much faster then searching by tag’s value
#2 is clean and more accurate then #1