Browse Source

Added check for zoom change to avoid constant repaint

-forceRepaintCount no longer gets set every time OnGUI is called
because of DoZoom function
master
Zach Vinless 8 years ago
parent
commit
5af37c9415
  1. 3
      Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

3
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)); GUILayout.Label(flowchart.Zoom.ToString("0.0#x"), EditorStyles.miniLabel, GUILayout.Width(30));
if (newZoom != flowchart.Zoom)
{
DoZoom(flowchart, newZoom - flowchart.Zoom, Vector2.one * 0.5f); DoZoom(flowchart, newZoom - flowchart.Zoom, Vector2.one * 0.5f);
}
if (GUILayout.Button("Center", EditorStyles.toolbarButton)) if (GUILayout.Button("Center", EditorStyles.toolbarButton))
{ {

Loading…
Cancel
Save