Skip to content

Commit

Permalink
#5613: Fix some non-shared spawnargs showing up in the entity inspect…
Browse files Browse the repository at this point in the history
…or key value store
  • Loading branch information
codereader authored and angua committed Oct 22, 2021
1 parent 80f1b2f commit 3729799
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions libs/selection/CollectiveSpawnargs.h
Expand Up @@ -113,9 +113,18 @@ class CollectiveSpawnargs

if (keyValueSet.entities.size() == 1)
{
// The set was newly created, this was a new (and therefore unique) keyvalue
keyValueSet.valueIsEqualOnAllEntities = true;
_sigKeyAdded.emit(key, value.get());
// If we have only one entity registered, this is a unique set
if (_keyValuesByEntity.size() == 1)
{
// The set was newly created, this was a new (and therefore unique) keyvalue
keyValueSet.valueIsEqualOnAllEntities = true;
_sigKeyAdded.emit(key, value.get());
}
else
{
// We know of more entities that don't have this key, don't add it
keyValueSet.valueIsEqualOnAllEntities = false;
}
}
// This was not the first entity using this key, check if the values are unique
// We only bother checking if the already existing set had the same value
Expand Down

0 comments on commit 3729799

Please sign in to comment.