Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid returning resources declared inside disabled nodes #1439

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Bonsai.System/IO/Ports/PortNameConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public override StandardValuesCollection GetStandardValues(ITypeDescriptorContex
if (workflowBuilder != null)
{
var portNames = (from builder in workflowBuilder.Workflow.Descendants()
where builder is not DisableBuilder
let createPort = ExpressionBuilder.GetWorkflowElement(builder) as CreateSerialPort
where createPort != null && !string.IsNullOrEmpty(createPort.PortName)
select !string.IsNullOrEmpty(createPort.Name) ? createPort.Name : createPort.PortName)
Expand Down
1 change: 1 addition & 0 deletions Bonsai.System/Resources/ResourceNameConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static IEnumerable<ExpressionBuilder> SelectContextElements(ExpressionBuilderGra
foreach (var node in source)
{
var element = ExpressionBuilder.Unwrap(node.Value);
if (element is DisableBuilder) continue;
yield return element;

var workflowBuilder = element as IWorkflowExpressionBuilder;
Expand Down
Loading