From 789ec55dbe7bc20979b02a1f4ac81e1c1ab4d84e Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Wed, 28 Sep 2022 22:03:26 -0500 Subject: [PATCH] Removed double click to rename content item --- Source/Editor/Content/GUI/ContentView.cs | 9 --------- Source/Editor/Content/Items/ContentItem.cs | 15 +++------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Source/Editor/Content/GUI/ContentView.cs b/Source/Editor/Content/GUI/ContentView.cs index e0affeedc..bf9fb1715 100644 --- a/Source/Editor/Content/GUI/ContentView.cs +++ b/Source/Editor/Content/GUI/ContentView.cs @@ -536,15 +536,6 @@ namespace FlaxEditor.Content.GUI } } - /// - /// Called when user wants to rename item. - /// - /// The item. - public void OnItemDoubleClickName(ContentItem item) - { - OnRename?.Invoke(item); - } - /// /// Called when user wants to open item. /// diff --git a/Source/Editor/Content/Items/ContentItem.cs b/Source/Editor/Content/Items/ContentItem.cs index d887c304e..1cc6d480e 100644 --- a/Source/Editor/Content/Items/ContentItem.cs +++ b/Source/Editor/Content/Items/ContentItem.cs @@ -690,18 +690,9 @@ namespace FlaxEditor.Content public override bool OnMouseDoubleClick(Float2 location, MouseButton button) { Focus(); - - // Check if clicked on name area (and can be renamed) - if (CanRename && TextRectangle.Contains(ref location)) - { - // Rename - (Parent as ContentView).OnItemDoubleClickName(this); - } - else - { - // Open - (Parent as ContentView).OnItemDoubleClick(this); - } + + // Open + (Parent as ContentView).OnItemDoubleClick(this); return true; }