diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index 2f7b771a..7e6702eb 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -224,6 +224,8 @@ namespace Fungus.EditorUtils } } private GUIStyle toolbarSeachCancelButtonStyle; + private bool didDoubleClick; + protected GUIStyle ToolbarSeachCancelButtonStyle { get @@ -1027,6 +1029,15 @@ namespace Fungus.EditorUtils { if (hitBlock != null) { + if(e.clickCount == 2) + { + CenterBlock(hitBlock); + + e.Use(); + didDoubleClick = true; + return; + } + startDragPosition = e.mousePosition / flowchart.Zoom - flowchart.ScrollPos; Undo.RecordObject(flowchart, "Select"); @@ -1177,7 +1188,13 @@ namespace Fungus.EditorUtils switch (e.button) { case MouseButton.Left: - + if(didDoubleClick) + { + didDoubleClick = false; + return; + } + + if (dragBlock != null) { for (int i = 0; i < flowchart.SelectedBlocks.Count; ++i)