Skip to content

Commit

Permalink
Add support for polymorphic operator docs
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed May 19, 2023
1 parent aacf0ec commit 9821d87
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Bonsai.Editor/EditorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,12 @@ static bool TryGetAssemblyResource(string path, out string assemblyName, out str
private async Task OpenDocumentationAsync(ExpressionBuilder builder)
{
var selectedElement = ExpressionBuilder.GetWorkflowElement(builder);
if (selectedElement is ICustomTypeDescriptor typeDescriptor &&
typeDescriptor.GetPropertyOwner(null) is object selectedOperator)
{
selectedElement = selectedOperator;
}

if (selectedElement is IncludeWorkflowBuilder include &&
TryGetAssemblyResource(include.Path, out string assemblyName, out string resourceName))
{
Expand Down

0 comments on commit 9821d87

Please sign in to comment.