Browse Source

Fixed faulty indent levels when inspector is not displayed #380

master
chrisgregan 9 years ago
parent
commit
38f591068d
  1. 12
      Assets/Fungus/Flowchart/Editor/BlockEditor.cs

12
Assets/Fungus/Flowchart/Editor/BlockEditor.cs

@ -336,7 +336,8 @@ namespace Fungus
foreach (System.Type type in eventHandlerTypes) foreach (System.Type type in eventHandlerTypes)
{ {
EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type); EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type);
if (info.Category.Length == 0) if (info != null &&
info.Category.Length == 0)
{ {
SetEventHandlerOperation operation = new SetEventHandlerOperation(); SetEventHandlerOperation operation = new SetEventHandlerOperation();
operation.block = block; operation.block = block;
@ -350,7 +351,8 @@ namespace Fungus
foreach (System.Type type in eventHandlerTypes) foreach (System.Type type in eventHandlerTypes)
{ {
EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type); EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type);
if (info.Category.Length > 0) if (info != null &&
info.Category.Length > 0)
{ {
SetEventHandlerOperation operation = new SetEventHandlerOperation(); SetEventHandlerOperation operation = new SetEventHandlerOperation();
operation.block = block; operation.block = block;
@ -558,7 +560,8 @@ namespace Fungus
foreach (System.Type type in eventHandlerTypes) foreach (System.Type type in eventHandlerTypes)
{ {
EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type); EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type);
if (info.Category != "" && if (info != null &&
info.Category != "" &&
!eventHandlerCategories.Contains(info.Category)) !eventHandlerCategories.Contains(info.Category))
{ {
eventHandlerCategories.Add(info.Category); eventHandlerCategories.Add(info.Category);
@ -575,7 +578,8 @@ namespace Fungus
{ {
EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type); EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(type);
if (info.Category == category || if (info != null &&
info.Category == category ||
info.Category == "" && category == "Core") info.Category == "" && category == "Core")
{ {
markdown += "## " + info.EventHandlerName + "\n"; markdown += "## " + info.EventHandlerName + "\n";

Loading…
Cancel
Save