From a8d97f1daaa8d4de6317d11107b4cc7b2e2bbf6d Mon Sep 17 00:00:00 2001 From: Nils Hausfeld Date: Sat, 15 Jun 2024 11:32:47 +0200 Subject: [PATCH] - Skip group filtering if the string in front of the dot is empty or doesn't start with a letter, to make spawning float nodes work again --- .../Surface/ContextMenu/VisjectCMGroup.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs b/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs index d8cf0433f..d794d1642 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs @@ -96,15 +96,20 @@ namespace FlaxEditor.Surface.ContextMenu int dotIndex = filterText.IndexOf('.'); if (dotIndex != -1) { - // Early out and make the group invisible if it doesn't start with the specified string string filterGroupName = filterText.Substring(0, dotIndex); - if (!Name.StartsWith(filterGroupName, StringComparison.InvariantCultureIgnoreCase)) + + // If the string in front of the dot has the length of 0 or doesn't start with a letter we skip the filtering to make spawning floats work + if (filterGroupName.Length > 0 && char.IsLetter(filterGroupName[0])) { - Visible = false; - Profiler.EndEvent(); - return; + // Early out and make the group invisible if it doesn't start with the specified string + if (!Name.StartsWith(filterGroupName, StringComparison.InvariantCultureIgnoreCase)) + { + Visible = false; + Profiler.EndEvent(); + return; + } + filterText = filterText.Substring(dotIndex + 1); } - filterText = filterText.Substring(dotIndex + 1); } }