From 5af37c941544b842dc1d2541c6f2ef449d83ff7f Mon Sep 17 00:00:00 2001 From: Zach Vinless Date: Mon, 7 Nov 2016 07:19:06 -0800 Subject: [PATCH] Added check for zoom change to avoid constant repaint -forceRepaintCount no longer gets set every time OnGUI is called because of DoZoom function --- Assets/Fungus/Scripts/Editor/FlowchartWindow.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index b943fe9e..be03da99 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -210,7 +210,10 @@ namespace Fungus.EditorUtils ); GUILayout.Label(flowchart.Zoom.ToString("0.0#x"), EditorStyles.miniLabel, GUILayout.Width(30)); - DoZoom(flowchart, newZoom - flowchart.Zoom, Vector2.one * 0.5f); + if (newZoom != flowchart.Zoom) + { + DoZoom(flowchart, newZoom - flowchart.Zoom, Vector2.one * 0.5f); + } if (GUILayout.Button("Center", EditorStyles.toolbarButton)) {