diff --git a/TBF/Rig/Sequences/SequenceBase.cs b/TBF/Rig/Sequences/SequenceBase.cs index 1ccf6b77c..3fc26a39c 100644 --- a/TBF/Rig/Sequences/SequenceBase.cs +++ b/TBF/Rig/Sequences/SequenceBase.cs @@ -469,7 +469,7 @@ namespace TBF.Rig.Sequences } /// Get new regulation valve positions, - float[] allRegvPositions = Utils.GetRegulValvesPositions(step.RegulValvesPct); + float[] allRegvPositions = Utils.GetRegulValvesPositions(step.RegulValvesPct, RegulValves.Count); /// Prepare necessary SetRegValvePositionOp operations for RV-s with changed positions IList rvPosOps = new List(); diff --git a/TBF/Utils.cs b/TBF/Utils.cs index f5d8f4b13..bc08f64be 100644 --- a/TBF/Utils.cs +++ b/TBF/Utils.cs @@ -193,9 +193,8 @@ namespace TBF /// /// TransitionStep entity /// float[] of regulation valve positions from 0 to 100.0f - public static float[] GetRegulValvesPositions(string regulValvesPct) + public static float[] GetRegulValvesPositions(string regulValvesPct, int regvCount) { - int regvCount = Rig.Sequences.SequenceBase.RegulValves.Count; float[] result = new float[regvCount]; string[] rvPosStr = (regulValvesPct != null) ? regulValvesPct.Split(new char[] { ';' }) : new string[0];