File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Fixed
11+
12+ - Clearing an entity with inherited components no longer leaves the entity with missed components.
13+
1014## [ 5.2.3] - 2024-08-20
1115
1216### Fixed
Original file line number Diff line number Diff line change @@ -126,10 +126,10 @@ def clear(self) -> None:
126126
127127 .. versionadded:: 4.2.0
128128 """
129- self .components .clear ()
130- self .tags .clear ()
131- self .relation_tags_many .clear ()
132- self .relation_components .clear ()
129+ self .components ( traverse = ()) .clear ()
130+ self .tags ( traverse = ()) .clear ()
131+ self .relation_tags_many ( traverse = ()) .clear ()
132+ self .relation_components ( traverse = ()) .clear ()
133133
134134 def instantiate (self ) -> Self :
135135 """Return a new entity which inherits the components, tags, and relations of this entity.
You can’t perform that action at this time.
0 commit comments