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:
@@ -1,4 +1,4 @@
|
||||
using System.Numerics;
|
||||
using System.Numerics;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -19,7 +19,7 @@ namespace Content.Client.UserInterface.Controls
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
DisposeAllChildren();
|
||||
RemoveAllChildren();
|
||||
}
|
||||
|
||||
public void AddEntry(float amount, Color color, string? tooltip = null)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Client.UserInterface
|
||||
|
||||
public void UpdateValues(List<string> headers, List<string[]> values)
|
||||
{
|
||||
Values.DisposeAllChildren();
|
||||
Values.RemoveAllChildren();
|
||||
Values.Columns = headers.Count;
|
||||
|
||||
for (var i = 0; i < headers.Count; i++)
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls
|
||||
|
||||
public void Populate()
|
||||
{
|
||||
ButtonContainer.DisposeAllChildren();
|
||||
ButtonContainer.RemoveAllChildren();
|
||||
AddButtons();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles
|
||||
public void ClearEntries()
|
||||
{
|
||||
NoRolesMessage.Visible = true;
|
||||
EntryContainer.DisposeAllChildren();
|
||||
EntryContainer.RemoveAllChildren();
|
||||
_collapsibleBoxes.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Client.UserInterface.Systems.Inventory.Controls;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
|
||||
@@ -74,7 +74,7 @@ public sealed class HandsContainer : ItemSlotUIContainer<HandButton>
|
||||
public void Clear()
|
||||
{
|
||||
ClearButtons();
|
||||
_grid.DisposeAllChildren();
|
||||
_grid.RemoveAllChildren();
|
||||
}
|
||||
|
||||
public IEnumerable<HandButton> GetButtons()
|
||||
|
||||
Reference in New Issue
Block a user