From 060bff1bdb50780da099bd7fc1954a72dc7f72f4 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 14 Oct 2023 16:21:10 +0200 Subject: [PATCH] Fix leftover separator in context menu in Content Window in some locations --- Source/Editor/Windows/ContentWindow.ContextMenu.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Editor/Windows/ContentWindow.ContextMenu.cs b/Source/Editor/Windows/ContentWindow.ContextMenu.cs index 03873df57..56136cfbf 100644 --- a/Source/Editor/Windows/ContentWindow.ContextMenu.cs +++ b/Source/Editor/Windows/ContentWindow.ContextMenu.cs @@ -2,6 +2,7 @@ using System; using System.IO; +using System.Linq; using FlaxEditor.Content; using FlaxEditor.GUI.ContextMenu; using FlaxEditor.Scripting; @@ -249,6 +250,10 @@ namespace FlaxEditor.Windows }); } + // Remove any leftover separator + if (cm.ItemsContainer.Children.LastOrDefault() is ContextMenuSeparator) + cm.ItemsContainer.Children.Last().Dispose(); + // Show it cm.Show(this, location); }