]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Cleanup - Use `RemoveAllChildren()` over `DisposeAllChildren()` (#39848)
authorLordCarve <27449516+LordCarve@users.noreply.github.com>
Tue, 23 Sep 2025 03:40:48 +0000 (05:40 +0200)
committerGitHub <noreply@github.com>
Tue, 23 Sep 2025 03:40:48 +0000 (15:40 +1200)
* Content - change the (should-be-obsolete) DisposeAllChildren into the more robust RemoveAllChildren.

* Remove duplicate calls.

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
35 files changed:
Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs
Content.Client/Administration/UI/ManageSolutions/EditSolutionsWindow.xaml.cs
Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs
Content.Client/Cargo/UI/CargoShuttleMenu.xaml.cs
Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs
Content.Client/Changelog/ChangelogWindow.xaml.cs
Content.Client/ContextMenu/UI/ContextMenuUIController.cs
Content.Client/ContextMenu/UI/EntityMenuUIController.cs
Content.Client/Crayon/UI/CrayonWindow.xaml.cs
Content.Client/CrewManifest/CrewManifestUi.xaml.cs
Content.Client/Gateway/UI/GatewayWindow.xaml.cs
Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Content.Client/Humanoid/MarkingPicker.xaml.cs
Content.Client/Humanoid/SingleMarkingPicker.xaml.cs
Content.Client/Lobby/UI/CharacterSetupGui.xaml.cs
Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs
Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
Content.Client/Mapping/MappingPrototypeList.xaml.cs
Content.Client/Mapping/MappingState.cs
Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs
Content.Client/Salvage/UI/OfferingWindow.xaml.cs
Content.Client/Shuttles/UI/DockingScreen.xaml.cs
Content.Client/Shuttles/UI/EmergencyConsoleWindow.xaml.cs
Content.Client/Shuttles/UI/MapScreen.xaml.cs
Content.Client/Strip/StrippingMenu.cs
Content.Client/Thief/ThiefBackpackMenu.xaml.cs
Content.Client/UserInterface/Controls/SplitBar.xaml.cs
Content.Client/UserInterface/StatsWindow.xaml.cs
Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs
Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesWindow.xaml.cs
Content.Client/UserInterface/Systems/Hands/Controls/HandsContainer.cs
Content.Client/Verbs/UI/VerbMenuUIController.cs

index 8e527d7343a341114a7f3849135085da37075311..a783dd368fe1cc2e5b9e8055e4438bf02dd2b2e7 100644 (file)
@@ -25,7 +25,7 @@ namespace Content.Client.Access.UI
         public void SetAccessLevels(IPrototypeManager protoManager, List<ProtoId<AccessLevelPrototype>> accessLevels)
         {
             _accessButtons.Clear();
-            AccessLevelGrid.DisposeAllChildren();
+            AccessLevelGrid.RemoveAllChildren();
 
             foreach (var access in accessLevels)
             {
index 320bb88a67e6d6858b57070396e8a89f73974a57..209c58c9506dc4bb44f2eefe07039e5c8fb0e5d5 100644 (file)
@@ -41,7 +41,7 @@ namespace Content.Client.Access.UI
 
         public void SetAllowedIcons(string currentJobIconId)
         {
-            IconGrid.DisposeAllChildren();
+            IconGrid.RemoveAllChildren();
 
             var jobIconButtonGroup = new ButtonGroup();
             var i = 0;
index 41d5a84654f9db700437d3e8e58cc03747fffd80..7af78d9e5f206aafdfaa6e543deb91e2769ce6ae 100644 (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
index a6b61a4393179ac219fe1fa5b2654c1d543e23f6..89016fdf41da7428671cde0d7dfbbf2103cc0509 100644 (file)
@@ -67,7 +67,7 @@ namespace Content.Client.Administration.UI.ManageSolutions
         /// </summary>
         public void UpdateReagents()
         {
-            ReagentList.DisposeAllChildren();
+            ReagentList.RemoveAllChildren();
 
             if (_selectedSolution == null || _solutions == null)
                 return;
@@ -92,7 +92,7 @@ namespace Content.Client.Administration.UI.ManageSolutions
         /// <param name="solution">The selected solution.</param>
         private void UpdateVolumeBox(Solution solution)
         {
-            VolumeBox.DisposeAllChildren();
+            VolumeBox.RemoveAllChildren();
 
             var volumeLabel = new Label();
             volumeLabel.HorizontalExpand = true;
@@ -131,7 +131,7 @@ namespace Content.Client.Administration.UI.ManageSolutions
         /// <param name="solution">The selected solution.</param>
         private void UpdateThermalBox(Solution solution)
         {
-            ThermalBox.DisposeAllChildren();
+            ThermalBox.RemoveAllChildren();
             var heatCap = solution.GetHeatCapacity(null);
             var specificHeatLabel = new Label();
             specificHeatLabel.HorizontalExpand = true;
index 03246cfdfe55db1c59f7810e451de1121adc319e..624ab361250a54f2b4ddeac2f00e3ee4b603bcb2 100644 (file)
@@ -206,7 +206,7 @@ namespace Content.Client.Cargo.UI
             if (!_orderConsoleQuery.TryComp(_owner, out var orderConsole))
                 return;
 
-            Requests.DisposeAllChildren();
+            Requests.RemoveAllChildren();
 
             foreach (var order in orders)
             {
index c1ffed0783301e07188e599ee3a131fa99f026bf..970051432be434b7058f4db3b466e847c63f5dea 100644 (file)
@@ -30,7 +30,7 @@ namespace Content.Client.Cargo.UI
 
         public void SetOrders(SpriteSystem sprites, IPrototypeManager protoManager, List<CargoOrderData> orders)
         {
-            Orders.DisposeAllChildren();
+            Orders.RemoveAllChildren();
 
             foreach (var order in orders)
             {
index 27ddd51815e3c566b76b055df192a99e160554fa..4daab3d27c241889f5cb87b3064cefcd93dda190 100644 (file)
@@ -1,4 +1,4 @@
-using Content.Client.CrewManifest.UI;
+using Content.Client.CrewManifest.UI;
 using Content.Shared.CrewManifest;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.Controls;
@@ -21,7 +21,6 @@ public sealed partial class CrewManifestUiFragment : BoxContainer
 
     public void UpdateState(string stationName, CrewManifestEntries? entries)
     {
-        CrewManifestListing.DisposeAllChildren();
         CrewManifestListing.RemoveAllChildren();
 
         StationNameContainer.Visible = entries != null;
index d82c34254c5143dd51b7a1abef86fcb36628dcc1..d8f560f15189e0fc5358c2e6652279175a64b623 100644 (file)
@@ -55,7 +55,7 @@ namespace Content.Client.Changelog
             // Changelog is not kept in memory so load it again.
             var changelogs = await _changelog.LoadChangelog();
 
-            Tabs.DisposeAllChildren();
+            Tabs.RemoveAllChildren();
 
             var i = 0;
             foreach (var changelog in changelogs)
index 1b83f5ed03352cb830adf8b72dda1877b1ef69b4..ca173ff1e1ce6b2b48659e22ac3b62c7db85d5d8 100644 (file)
@@ -95,7 +95,7 @@ namespace Content.Client.ContextMenu.UI
         /// </summary>
         public void Close()
         {
-            RootMenu.MenuBody.DisposeAllChildren();
+            RootMenu.MenuBody.RemoveAllChildren();
             CancelOpen?.Cancel();
             CancelClose?.Cancel();
             OnContextClosed?.Invoke();
index e0a88300db7c469e3c35945fee56e4d8b3787649..1855911ca42c314715179d11980218ab5e407edd 100644 (file)
@@ -293,7 +293,7 @@ namespace Content.Client.ContextMenu.UI
             var element = new EntityMenuElement(entity);
             element.SubMenu = new ContextMenuPopup(_context, element);
             element.SubMenu.OnPopupOpen += () => _verb.OpenVerbMenu(entity, popup: element.SubMenu);
-            element.SubMenu.OnPopupHide += element.SubMenu.MenuBody.DisposeAllChildren;
+            element.SubMenu.OnPopupHide += element.SubMenu.MenuBody.RemoveAllChildren;
             _context.AddElement(menu, element);
             Elements.TryAdd(entity, element);
         }
index 88475562c674b462912b522b098ae8724af9b768..f1ac5a79cb53e2ab40c1c92ba19e1b8ceb631b39 100644 (file)
@@ -53,7 +53,7 @@ namespace Content.Client.Crayon.UI
         private void RefreshList()
         {
             // Clear
-            Grids.DisposeAllChildren();
+            Grids.RemoveAllChildren();
 
             if (_decals == null || _allDecals == null)
                 return;
index f07e54eb65b508701765770f9603d84017ef2655..3c13681b97d44aa2786c45617b73a9ecd55a28db 100644 (file)
@@ -18,7 +18,6 @@ public sealed partial class CrewManifestUi : DefaultWindow
 
     public void Populate(string name, CrewManifestEntries? entries)
     {
-        CrewManifestListing.DisposeAllChildren();
         CrewManifestListing.RemoveAllChildren();
 
         StationNameContainer.Visible = entries != null;
index 1c779b2b3508adf26f4d818846dbf5be2b930765..9fb7c339d3c91c7140ac93944631faaf591c8094 100644 (file)
@@ -72,7 +72,7 @@ public sealed partial class GatewayWindow : FancyWindow,
         _isUnlockPending = _nextUnlock >= _timing.CurTime;
         _isCooldownPending = _nextReady >= _timing.CurTime;
 
-        Container.DisposeAllChildren();
+        Container.RemoveAllChildren();
 
         if (_destinations.Count == 0)
         {
index fd3615d59f5897c720979d1388b22707f6004d64..225619b0315bc7261521640ba4cd94182188c6b1 100644 (file)
@@ -116,7 +116,7 @@ namespace Content.Client.HealthAnalyzer.UI
             AlertsContainer.Visible = showAlerts;
 
             if (showAlerts)
-                AlertsContainer.DisposeAllChildren();
+                AlertsContainer.RemoveAllChildren();
 
             if (msg.Unrevivable == true)
                 AlertsContainer.AddChild(new RichTextLabel
index 5a571942b8a0116178b42e3ffea0d68024e3d66f..992a72b93049e511677d768fb9291c1a00c96781 100644 (file)
@@ -404,7 +404,7 @@ public sealed partial class MarkingPicker : Control
 
         var stateNames = GetMarkingStateNames(prototype);
         _currentMarkingColors.Clear();
-        CMarkingColors.DisposeAllChildren();
+        CMarkingColors.RemoveAllChildren();
         List<ColorSelectorSliders> colorSliders = new();
         for (int i = 0; i < prototype.Sprites.Count; i++)
         {
index 822768893e8c7da85ec68e460fcd5e7525da0a4b..7ff10d7e134abe1c1de869b6ac334b062531560f 100644 (file)
@@ -216,7 +216,6 @@ public sealed partial class SingleMarkingPicker : BoxContainer
 
         var marking = _markings[Slot];
 
-        ColorSelectorContainer.DisposeAllChildren();
         ColorSelectorContainer.RemoveAllChildren();
 
         if (marking.MarkingColors.Count != proto.Sprites.Count)
index 457991613249e20d0bb91d59788a12c7dc2db82e..28c5d7844e456b7b40a4164bde5f6e026ae53f0e 100644 (file)
@@ -72,7 +72,7 @@ namespace Content.Client.Lobby.UI
         public void ReloadCharacterPickers()
         {
             _createNewCharacterButton.Orphan();
-            Characters.DisposeAllChildren();
+            Characters.RemoveAllChildren();
 
             var numberOfFullSlots = 0;
             var characterButtonsGroup = new ButtonGroup();
index 609b633fe440b9a7829ae7ba9c3dc464f39b8474..38bd23e3db09439ac3f472841b3d0ceab74d8f6d 100644 (file)
@@ -491,7 +491,7 @@ namespace Content.Client.Lobby.UI
         /// </summary>
         public void RefreshTraits()
         {
-            TraitsList.DisposeAllChildren();
+            TraitsList.RemoveAllChildren();
 
             var traits = _prototypeManager.EnumeratePrototypes<TraitPrototype>().OrderBy(t => Loc.GetString(t.Name)).ToList();
             TabContainer.SetTabTitle(3, Loc.GetString("humanoid-profile-editor-traits-tab"));
@@ -632,7 +632,7 @@ namespace Content.Client.Lobby.UI
 
         public void RefreshAntags()
         {
-            AntagList.DisposeAllChildren();
+            AntagList.RemoveAllChildren();
             var items = new[]
             {
                 ("humanoid-profile-editor-antag-preference-yes-button", 0),
@@ -826,7 +826,7 @@ namespace Content.Client.Lobby.UI
         /// </summary>
         public void RefreshJobs()
         {
-            JobList.DisposeAllChildren();
+            JobList.RemoveAllChildren();
             _jobCategories.Clear();
             _jobPriorities.Clear();
             var firstCategory = true;
index 644910db601c64c5582c2b7801a019cde1c796d0..88fd34cb7e20199a4d15d2f2ecd395924ea1f0da 100644 (file)
@@ -42,7 +42,7 @@ public sealed partial class LoadoutGroupContainer : BoxContainer
     {
         var protoMan = collection.Resolve<IPrototypeManager>();
         var loadoutSystem = collection.Resolve<IEntityManager>().System<LoadoutSystem>();
-        RestrictionsContainer.DisposeAllChildren();
+        RestrictionsContainer.RemoveAllChildren();
 
         if (_groupProto.MinLimit > 0)
         {
@@ -71,7 +71,7 @@ public sealed partial class LoadoutGroupContainer : BoxContainer
             });
         }
 
-        LoadoutsContainer.DisposeAllChildren();
+        LoadoutsContainer.RemoveAllChildren();
 
         // Get all loadout prototypes for this group.
         var validProtos = _groupProto.Loadouts.Select(id => protoMan.Index(id));
index 619cac6839104cbd98a01afaa81ae8e0b82c4f7c..9b1e7d50f894a79bfc70e50f44c6fe58ee15cbc4 100644 (file)
@@ -43,7 +43,7 @@ public sealed partial class LobbyCharacterPreviewPanel : Control
 
         _previewDummy = uid;
 
-        ViewBox.DisposeAllChildren();
+        ViewBox.RemoveAllChildren();
         var spriteView = new SpriteView
         {
             OverrideDirection = Direction.South,
index 8b59e6eb6f18f732b78bb239ff91f9308b855089..13c92c451614a91055ddc9ae9640ce4cdee0ecbf 100644 (file)
@@ -1,4 +1,4 @@
-using System.Numerics;
+using System.Numerics;
 using Robust.Client.AutoGenerated;
 using Robust.Client.Graphics;
 using Robust.Client.UserInterface;
@@ -37,7 +37,7 @@ public sealed partial class MappingPrototypeList : Control
     {
         _prototypes.Clear();
 
-        PrototypeList.DisposeAllChildren();
+        PrototypeList.RemoveAllChildren();
 
         _prototypes.AddRange(prototypes);
 
@@ -99,7 +99,7 @@ public sealed partial class MappingPrototypeList : Control
     public void Search(List<MappingPrototype> prototypes)
     {
         _search.Clear();
-        SearchList.DisposeAllChildren();
+        SearchList.RemoveAllChildren();
         _lastIndices = (0, -1);
 
         _search.AddRange(prototypes);
index 97fbee70bc6ca1e36f8ef4263db92967fbe3781e..27440607cb672825fb0d4374f533b69783387a8a 100644 (file)
@@ -861,7 +861,7 @@ public sealed class MappingState : GameplayStateBase
         }
         else
         {
-            button.ChildrenPrototypes.DisposeAllChildren();
+            button.ChildrenPrototypes.RemoveAllChildren();
             button.CollapseButton.Label.Text = "▶";
         }
     }
index e2b27c1b622f80dbefa092f6263eb33fa70e0186..209c1cd32bd537bea955b8cdd9299e7fa329ca8d 100644 (file)
@@ -53,8 +53,8 @@ public sealed partial class PowerMonitoringWindow
             // Selection action
             windowEntry.Button.OnButtonUp += args =>
             {
-                windowEntry.SourcesContainer.DisposeAllChildren();
-                windowEntry.LoadsContainer.DisposeAllChildren();
+                windowEntry.SourcesContainer.RemoveAllChildren();
+                windowEntry.LoadsContainer.RemoveAllChildren();
                 ButtonAction(windowEntry, masterContainer);
             };
         }
index 2b607b82139caea4d0bb0603c9f96b265aa89cb4..3b12a31c7730b5f7766f9832b61345e6e2448ece 100644 (file)
@@ -70,7 +70,7 @@ public sealed partial class OfferingWindow : FancyWindow,
 
     public void ClearOptions()
     {
-        Container.DisposeAllChildren();
+        Container.RemoveAllChildren();
     }
 
     protected override void FrameUpdate(FrameEventArgs args)
index 97943c6973f85b487eb3413f9fb902a3d45575fb..97125d31593adec864179e1c93d586cb9cbb5316 100644 (file)
@@ -67,8 +67,8 @@ public sealed partial class DockingScreen : BoxContainer
     {
         DockingControl.BuildDocks(shuttle);
         var currentDock = DockingControl.ViewedDock;
-        // DockedWith.DisposeAllChildren();
-        DockPorts.DisposeAllChildren();
+        // DockedWith.RemoveAllChildren();
+        DockPorts.RemoveAllChildren();
         _ourDockButtons.Clear();
 
         if (shuttle == null)
index 87103084b47a62bb176a410230f59e58549e3276..f9a7f02d7e49b2fb36c9309c0ac60a8d9cca8ccf 100644 (file)
@@ -59,7 +59,7 @@ public sealed partial class EmergencyConsoleWindow : FancyWindow,
         // TODO: Loc and cvar for this.
         _earlyLaunchTime = scc.EarlyLaunchTime;
 
-        AuthorizationsContainer.DisposeAllChildren();
+        AuthorizationsContainer.RemoveAllChildren();
         var remainingAuths = scc.AuthorizationsRequired - scc.Authorizations.Count;
         AuthorizationCount.Text = Loc.GetString("emergency-shuttle-ui-remaining", ("remaining", remainingAuths));
 
index 0d7df38b9127b645ddc0bbf39d4044e847e311c5..72ad3c28b1d19a8e8155f9202934f7cc0a6a248b 100644 (file)
@@ -237,7 +237,7 @@ public sealed partial class MapScreen : BoxContainer
     private void ClearMapObjects()
     {
         _mapObjectControls.Clear();
-        HyperspaceDestinations.DisposeAllChildren();
+        HyperspaceDestinations.RemoveAllChildren();
         _pendingMapObjects.Clear();
         _mapObjects.Clear();
         _mapHeadings.Clear();
index 531e5fb44d8b86b8bc9219cf362105a532418df2..124356e0110df93aeb025fbbee33c32f6c7a2da1 100644 (file)
@@ -25,9 +25,9 @@ namespace Content.Client.Strip
 
         public void ClearButtons()
         {
-            InventoryContainer.DisposeAllChildren();
-            HandsContainer.DisposeAllChildren();
-            SnareContainer.DisposeAllChildren();
+            InventoryContainer.RemoveAllChildren();
+            HandsContainer.RemoveAllChildren();
+            SnareContainer.RemoveAllChildren();
         }
 
         protected override void FrameUpdate(FrameEventArgs args)
index aaee35761749f8da7c9ac80a749bb8efa7ad5143..328ca45b4b73de3265ccebb11a0fe31ce0876d67 100644 (file)
@@ -29,7 +29,7 @@ public sealed partial class ThiefBackpackMenu : FancyWindow
 
     public void UpdateState(ThiefBackpackBoundUserInterfaceState state)
     {
-        SetsGrid.DisposeAllChildren();
+        SetsGrid.RemoveAllChildren();
         var selectedNumber = 0;
         foreach (var (set, info) in state.Sets)
         {
index 2c0b716448e24643dd37daaa2caa1cb5ef7004ff..2f69b15499dde80461fb447cd36581c33475c1be 100644 (file)
@@ -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)
index 29c48fff67f60306dbb1ba61e58dab38bd7b10e0..5684be9e5bf7e0e099f31ec673cc42b050883262 100644 (file)
@@ -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++)
index 3ef69578a06166e56794516c32168e11947cbb24..17b4e04d246f59721e975d8e9b250f62d1db31f7 100644 (file)
@@ -45,7 +45,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls
 
         public void Populate()
         {
-            ButtonContainer.DisposeAllChildren();
+            ButtonContainer.RemoveAllChildren();
             AddButtons();
         }
 
index 9e2ff816b36d7d06ae3aa418f73f88e8c3138665..dd5e7e6a9b75d539a4421c27465578d51d7276e0 100644 (file)
@@ -26,7 +26,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles
         public void ClearEntries()
         {
             NoRolesMessage.Visible = true;
-            EntryContainer.DisposeAllChildren();
+            EntryContainer.RemoveAllChildren();
             _collapsibleBoxes.Clear();
         }
 
index 1421e302b867346fe03ffe2bd0552f60055a4ee6..d2f24abd6c57d6444498570d60d79dbcf3b528b9 100644 (file)
@@ -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()
index 32da302904fc20adbb621b41d6209c806ac832e3..a45dc90cb74b39adbdf39f98da79666c7f86694b 100644 (file)
@@ -109,7 +109,7 @@ namespace Content.Client.Verbs.UI
             Close();
 
             var menu = popup ?? _context.RootMenu;
-            menu.MenuBody.DisposeAllChildren();
+            menu.MenuBody.RemoveAllChildren();
 
             CurrentTarget = target;
             CurrentVerbs = _verbSystem.GetVerbs(target, user, Verb.VerbTypes, out ExtraCategories, force);
@@ -207,7 +207,7 @@ namespace Content.Client.Verbs.UI
         /// </summary>
         public void AddServerVerbs(List<Verb>? verbs, ContextMenuPopup popup)
         {
-            popup.MenuBody.DisposeAllChildren();
+            popup.MenuBody.RemoveAllChildren();
 
             // Verbs may be null if the server does not think we can see the target entity. This **should** not happen.
             if (verbs == null)