Browse Source

When a change is detected in the flowchartwindow var list mark the flowchart dirty so the inspector refreshes.

master
desktop-maesty/steve 7 years ago
parent
commit
7749f8b3c8
  1. 6
      Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

6
Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

@ -510,6 +510,7 @@ namespace Fungus.EditorUtils
{ {
GUILayout.Space(8); GUILayout.Space(8);
EditorGUI.BeginChangeCheck();
if (variableListAdaptor != null) if (variableListAdaptor != null)
{ {
@ -519,6 +520,11 @@ namespace Fungus.EditorUtils
variableListAdaptor.DrawVarList(0); variableListAdaptor.DrawVarList(0);
} }
if(EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(flowchart);
}
Rect variableWindowRect = GUILayoutUtility.GetLastRect(); Rect variableWindowRect = GUILayoutUtility.GetLastRect();
if (flowchart.VariablesExpanded && flowchart.Variables.Count > 0) if (flowchart.VariablesExpanded && flowchart.Variables.Count > 0)
{ {

Loading…
Cancel
Save