diff --git a/Assets/Fungus/Docs/CHANGELOG.txt b/Assets/Fungus/Docs/CHANGELOG.txt index 232c3146..fd5ef1ed 100644 --- a/Assets/Fungus/Docs/CHANGELOG.txt +++ b/Assets/Fungus/Docs/CHANGELOG.txt @@ -5,6 +5,7 @@ Unreleased ====== ## Fixed - Add missing VariableDrawer for ObjectVariable. Thanks to CG-Tespy. + - Fix double duplication of blocks in flowchart window. Thanks to ongjinwen. ## Changed - Block will LogError when an exception is caught from a Command being Executed. diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index d5a9b6bf..7bcd90fe 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -1895,11 +1895,8 @@ namespace Fungus.EditorUtils { copyList.Clear(); - foreach (var block in flowchart.SelectedBlocks) - { - copyList.Add(new BlockCopy(block)); - } - foreach (var block in mouseDownSelectionState) + foreach (var block in flowchart.SelectedBlocks + .Union(mouseDownSelectionState)) { copyList.Add(new BlockCopy(block)); }