Fix EntityComponent handle entities without a name#8065
Conversation
|
My bad. I actually did check that assumption but I may have mixed up Anyway, this PR re-introduces the issue #6557 that I tried to fix. The point is to have I actually do not think the OrderedDict even makes a difference because it seems that entries are added in an arbitrary order during startup(?). So every restart we get a new order anyway. I propose to instead make the sorting work for |
|
Scripts are based off the configuration, which is parsed into an ordered dict by YAML. So if you want to re-order it, just change the order of the scripts. |
|
That's not what I observed. Unfortunately, I will not have time to test again today. Getting the lists stable between restarts would be an improvement but I do think alphabetical is a better default ordering and it is also how the default factory view presents things (last I looked, anyway). |
|
You're right for non-scripts, like platforms. As discovery can always change. I'll pick your solution 👍 |
|
Cherry-picked for 0.47 |
* Fix EntityComponent handle entities without a name * Implement solution by Anders
|
Thanks to all involved! Looking forward to the release today! |
Description:
In #7681 we added ordering to groups created by the EntityComponent. That PR incorrectly assumed that all entities always return a name.
To keep consistent ordering, entities have been converted to an ordered dictionary.
CC @amelchio
Related issue (if applicable): Reported by @arraylabs on Gitter:
Checklist:
If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests pass