Don't do work if assigning stylesheet a control already has

This commit is contained in:
PJB3005
2025-10-26 17:40:19 +01:00
parent 8235bd8478
commit 7542b1ca16
2 changed files with 4 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ END TEMPLATE-->
### Other
* Add pure to some SharedTransformSystem methods.
* `Control.Stylesheet` does not do any work if assigning the value it already has.
### Internal

View File

@@ -19,6 +19,9 @@ namespace Robust.Client.UserInterface
get => _stylesheet;
set
{
if (ReferenceEquals(_stylesheet, value))
return;
_stylesheet = value;
StylesheetUpdateRecursive();
}