Fix network configurator resolves (#16910)
This commit is contained in:
@@ -437,7 +437,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
|||||||
DeviceLinkSourceComponent? sourceComponent = null, DeviceLinkSinkComponent? sinkComponent = null,
|
DeviceLinkSourceComponent? sourceComponent = null, DeviceLinkSinkComponent? sinkComponent = null,
|
||||||
DeviceNetworkComponent? sourceNetworkComponent = null, DeviceNetworkComponent? sinkNetworkComponent = null)
|
DeviceNetworkComponent? sourceNetworkComponent = null, DeviceNetworkComponent? sinkNetworkComponent = null)
|
||||||
{
|
{
|
||||||
if (!Resolve(sourceUid, ref sourceComponent) || !Resolve(sinkUid, ref sinkComponent))
|
if (!Resolve(sourceUid, ref sourceComponent, false) || !Resolve(sinkUid, ref sinkComponent, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var sources = _deviceLinkSystem.GetSourcePorts(sourceUid, sourceComponent);
|
var sources = _deviceLinkSystem.GetSourcePorts(sourceUid, sourceComponent);
|
||||||
@@ -445,8 +445,8 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
|||||||
var links = _deviceLinkSystem.GetLinks(sourceUid, sinkUid, sourceComponent);
|
var links = _deviceLinkSystem.GetLinks(sourceUid, sinkUid, sourceComponent);
|
||||||
var defaults = _deviceLinkSystem.GetDefaults(sources);
|
var defaults = _deviceLinkSystem.GetDefaults(sources);
|
||||||
|
|
||||||
var sourceAddress = Resolve(sourceUid, ref sourceNetworkComponent) ? sourceNetworkComponent.Address : "";
|
var sourceAddress = Resolve(sourceUid, ref sourceNetworkComponent, false) ? sourceNetworkComponent.Address : "";
|
||||||
var sinkAddress = Resolve(sinkUid, ref sinkNetworkComponent) ? sinkNetworkComponent.Address : "";
|
var sinkAddress = Resolve(sinkUid, ref sinkNetworkComponent, false) ? sinkNetworkComponent.Address : "";
|
||||||
|
|
||||||
var state = new DeviceLinkUserInterfaceState(sources, sinks, links, sourceAddress, sinkAddress, defaults);
|
var state = new DeviceLinkUserInterfaceState(sources, sinks, links, sourceAddress, sinkAddress, defaults);
|
||||||
_uiSystem.TrySetUiState(configuratorUid, NetworkConfiguratorUiKey.Link, state);
|
_uiSystem.TrySetUiState(configuratorUid, NetworkConfiguratorUiKey.Link, state);
|
||||||
|
|||||||
Reference in New Issue
Block a user