From 8ac2d7069daf38743a624f0659b8bb7f3b65e5ef Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 21 Dec 2020 11:42:18 +0100 Subject: [PATCH] Fixes for code style (cherry picked from commit c987acb7091d750e2f9d0fe4be58c84743f44064) --- Source/Editor/GUI/ContextMenu/ContextMenu.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Editor/GUI/ContextMenu/ContextMenu.cs b/Source/Editor/GUI/ContextMenu/ContextMenu.cs index b017a21d3..b48e3ca59 100644 --- a/Source/Editor/GUI/ContextMenu/ContextMenu.cs +++ b/Source/Editor/GUI/ContextMenu/ContextMenu.cs @@ -157,21 +157,21 @@ namespace FlaxEditor.GUI.ContextMenu } /// - /// Sort all alphabetically. + /// Sorts all alphabetically. /// - /// Override + /// Overrides property. public void SortButtons(bool force = false) { if (!_autosort && !force) return; - _panel.Children.Sort(((control, control1) => - { - if (control is ContextMenuButton cmb && control1 is ContextMenuButton cmb1) - return String.Compare(cmb.Text, cmb1.Text, StringComparison.OrdinalIgnoreCase); - if (!(control is ContextMenuButton)) - return (1); - return (-1); - })); + _panel.Children.Sort((control, control1) => + { + if (control is ContextMenuButton cmb && control1 is ContextMenuButton cmb1) + return string.Compare(cmb.Text, cmb1.Text, StringComparison.OrdinalIgnoreCase); + if (!(control is ContextMenuButton)) + return 1; + return -1; + }); } ///