BHoM / Grasshopper_UI

Tools for Grasshopper
GNU Lesser General Public License v3.0
15 stars 4 forks source link

False Start Toggle triggers 3 times on each run #690

Closed FraserGreenroyd closed 7 months ago

FraserGreenroyd commented 7 months ago

Description:

The False Start Toggle triggers 3 times each time the value is changed, resulting in downstream components triggering 3 times as well.

Steps to reproduce:

Place a false start toggle on the canvas, trigger the component, and it will return true 3 times. Trigger it again and it will return false 3 times. You can see this by using this code in a C# component on the Grasshopper canvas:

private void RunScript(bool x, object y, ref object A)
{
  allBools.Add(x);
  A = allBools;
}

static List<bool> allBools = new List<bool>();

Where the static list can keep track of every bool you send into the component and you can see on the output that you get 3 outputs for 1 use.

Expected behaviour:

1 trigger == 1 result, not 3

Test file(s):

FalseStartToggleBug.zip