Skip to content

Commit

Permalink
Hopefully fix the dreaded VV refresh blink (#5517)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaphireLattice authored Nov 12, 2024
1 parent 2a1bcb6 commit f812dc4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Robust.Client/ViewVariables/Traits/ViewVariablesTraitMembers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Numerics;
using System.Collections.Generic;
using System.Numerics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.ViewVariables.Instances;
Expand Down Expand Up @@ -36,7 +37,7 @@ public ViewVariablesTraitMembers(IClientViewVariablesManagerInternal vvm, IRobus

public override async void Refresh()
{
_memberList.DisposeAllChildren();
List<Control> replacementControls = [];

if (Instance.Object != null)
{
Expand All @@ -51,7 +52,7 @@ public override async void Refresh()

foreach (var control in group)
{
_memberList.AddChild(control);
replacementControls.Add(control);
}
}
}
Expand Down Expand Up @@ -82,10 +83,16 @@ public override async void Refresh()
selectorChain, o, r);
};

_memberList.AddChild(propertyEdit);
replacementControls.Add(propertyEdit);
}
}
}

_memberList.DisposeAllChildren();
foreach (var item in replacementControls)
{
_memberList.AddChild(item);
}
}

internal static void CreateMemberGroupHeader(ref bool first, string groupName, Control container)
Expand Down

0 comments on commit f812dc4

Please sign in to comment.