mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-06-09 10:06:34 +02:00
Fix Overrides In WrapContainer (#6561)
Make {,Cross}SeparationOverride override StyleProperty
The doc comments say that Overide overrides the StyleProperty, but the
actual code makes it so that Seperationoverride is a fallback value.
This commit is contained in:
@@ -127,12 +127,12 @@ public sealed class WrapContainer : Container
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TryGetStyleProperty(StylePropertySeparation, out int separation))
|
||||
if (SeparationOverride is not null)
|
||||
{
|
||||
return separation;
|
||||
return SeparationOverride.Value;
|
||||
}
|
||||
|
||||
return SeparationOverride ?? 0;
|
||||
return StylePropertyDefault(StylePropertySeparation, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,12 +140,12 @@ public sealed class WrapContainer : Container
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TryGetStyleProperty(StylePropertyCrossSeparation, out int separation))
|
||||
if (CrossSeparationOverride is not null)
|
||||
{
|
||||
return separation;
|
||||
return CrossSeparationOverride.Value;
|
||||
}
|
||||
|
||||
return CrossSeparationOverride ?? 0;
|
||||
return StylePropertyDefault(StylePropertyCrossSeparation, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user