Removed double click to rename content item
This commit is contained in:
@@ -536,15 +536,6 @@ namespace FlaxEditor.Content.GUI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called when user wants to rename item.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item">The item.</param>
|
|
||||||
public void OnItemDoubleClickName(ContentItem item)
|
|
||||||
{
|
|
||||||
OnRename?.Invoke(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when user wants to open item.
|
/// Called when user wants to open item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -690,18 +690,9 @@ namespace FlaxEditor.Content
|
|||||||
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
|
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
|
||||||
{
|
{
|
||||||
Focus();
|
Focus();
|
||||||
|
|
||||||
// Check if clicked on name area (and can be renamed)
|
// Open
|
||||||
if (CanRename && TextRectangle.Contains(ref location))
|
(Parent as ContentView).OnItemDoubleClick(this);
|
||||||
{
|
|
||||||
// Rename
|
|
||||||
(Parent as ContentView).OnItemDoubleClickName(this);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Open
|
|
||||||
(Parent as ContentView).OnItemDoubleClick(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user