Add showing Visject context menu group when it's title has a filter match

This commit is contained in:
Wojtek Figat
2021-08-30 11:45:09 +02:00
parent 610763b637
commit 2b8259eb8a

View File

@@ -2,6 +2,7 @@
using System;
using FlaxEditor.Surface.Elements;
using FlaxEditor.Utilities;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -86,6 +87,19 @@ namespace FlaxEditor.Surface.ContextMenu
}
}
// Update header title
if (QueryFilterHelper.Match(filterText, HeaderText))
{
for (int i = 0; i < _children.Count; i++)
{
if (_children[i] is VisjectCMItem item)
{
item.Visible = true;
}
}
isAnyVisible = true;
}
// Update itself
if (isAnyVisible)
{