Browse Source

Removed selectedBlock and changed multi-select editor message

-Removed selectedBlock and removed update code copying it into
selectedBlocks
-Changed BlockInspector display message when multiple blocks are
selected
master
Zach Vinless 8 years ago
parent
commit
7445700fa4
  1. 13
      Assets/Fungus/Scripts/Components/Flowchart.cs
  2. 2
      Assets/Fungus/Scripts/Editor/BlockInspector.cs
  3. 2
      Assets/Fungus/Scripts/Utils/FungusConstants.cs

13
Assets/Fungus/Scripts/Components/Flowchart.cs

@ -40,10 +40,6 @@ namespace Fungus
[HideInInspector]
[SerializeField] protected Rect scrollViewRect;
[HideInInspector]
[FormerlySerializedAs("selectedSequence")]
[SerializeField] protected Block selectedBlock;
[HideInInspector]
[SerializeField] protected List<Block> selectedBlocks = new List<Block>();
@ -159,15 +155,6 @@ namespace Fungus
// No need to update
return;
}
else if (version < 2)
{
// Multi-select feature: update selection from single block to list
if (selectedBlock != null)
{
SelectedBlock = selectedBlock;
selectedBlock = null;
}
}
// Tell all components that implement IUpdateable to update to the new version
var components = GetComponents<Component>();

2
Assets/Fungus/Scripts/Editor/BlockInspector.cs

@ -85,7 +85,7 @@ namespace Fungus.EditorUtils
if (flowchart.SelectedBlocks.Count > 1)
{
GUILayout.Label("Multi-block editing not yet supported");
GUILayout.Label("Multiple blocks selected");
return;
}

2
Assets/Fungus/Scripts/Utils/FungusConstants.cs

@ -20,7 +20,7 @@ namespace Fungus
/// <summary>
/// The current version of the Flowchart. Used for updating components.
/// </summary>
public const int CurrentVersion = 2;
public const int CurrentVersion = 1;
/// <summary>
/// The name of the initial block in a new flowchart.

Loading…
Cancel
Save