mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
block
This commit is contained in:
@@ -176,7 +176,20 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
SetProperty(ref _actualItemHeight, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IParameter _parameter;
|
||||
public IParameter Parameter
|
||||
{
|
||||
get
|
||||
{
|
||||
return _parameter;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _parameter, value);
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<BlockDesignerItemViewModel> _children = new ObservableCollection<BlockDesignerItemViewModel>();
|
||||
public ObservableCollection<BlockDesignerItemViewModel> Children
|
||||
@@ -322,7 +335,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
if (OnlyOneChild)
|
||||
{
|
||||
return Children.FirstOrDefault()?.GetResult();
|
||||
if (Children?.Count == 1)
|
||||
{
|
||||
return Children.FirstOrDefault()?.GetResult();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Parameter?.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user