Cleanup - Use RemoveAllChildren() over DisposeAllChildren() (#39848)

* Content - change the (should-be-obsolete) DisposeAllChildren into the more robust RemoveAllChildren.

* Remove duplicate calls.

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
LordCarve
2025-09-23 05:40:48 +02:00
committed by GitHub
parent fd40888b0e
commit a3ddba6f42
35 changed files with 49 additions and 52 deletions

View File

@@ -99,8 +99,8 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer
private bool TryRebuildAccessGroupControls()
{
AccessGroupList.DisposeAllChildren();
AccessLevelChecklist.DisposeAllChildren();
AccessGroupList.RemoveAllChildren();
AccessLevelChecklist.RemoveAllChildren();
// No access level prototypes were assigned to any of the access level groups.
// Either the turret controller has no assigned access levels or their names were invalid.
@@ -165,7 +165,7 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer
/// </summary>
public void RebuildAccessLevelsControls()
{
AccessLevelChecklist.DisposeAllChildren();
AccessLevelChecklist.RemoveAllChildren();
_accessLevelEntries.Clear();
// No access level prototypes were assigned to any of the access level groups