Groups now get filtered by box type when added after the context menu was opened
This commit is contained in:
@@ -288,6 +288,10 @@ namespace FlaxEditor.Surface.ContextMenu
|
||||
OnSearchFilterChanged();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
group.EvaluateVisibilityWithBox(_selectedBox);
|
||||
}
|
||||
|
||||
Profiler.EndEvent();
|
||||
}
|
||||
@@ -321,6 +325,7 @@ namespace FlaxEditor.Surface.ContextMenu
|
||||
Parent = group
|
||||
};
|
||||
}
|
||||
group.EvaluateVisibilityWithBox(_selectedBox);
|
||||
group.SortChildren();
|
||||
group.Parent = _groupsPanel;
|
||||
_groups.Add(group);
|
||||
|
||||
@@ -117,10 +117,23 @@ namespace FlaxEditor.Surface.ContextMenu
|
||||
public bool CanConnectTo(Box startBox)
|
||||
{
|
||||
if (startBox == null)
|
||||
return true;
|
||||
{
|
||||
Visible = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_archetype.Title == "GetChild")
|
||||
{
|
||||
Debug.Log("");
|
||||
Debug.Log(_archetype.Create == null);
|
||||
Debug.Log(_archetype.Create.GetType() == typeof(FlaxEditor.Surface.Archetypes.Function.MethodOverrideNode));
|
||||
}
|
||||
|
||||
if(_archetype?.Elements == null)
|
||||
if (_archetype?.Elements == null)
|
||||
{
|
||||
Visible = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isCompatible = false;
|
||||
foreach (NodeElementArchetype element in _archetype.Elements)
|
||||
|
||||
Reference in New Issue
Block a user