From f051d51ae07a169f9a9564f5074d93e58caa20d3 Mon Sep 17 00:00:00 2001 From: Marek Frniak Date: Mon, 24 Aug 2026 14:25:19 +0200 Subject: [PATCH] : Incorrect cycle resume behavior after Stop and Start, increase revision to 3.9.3134.114 Cause: 1. When the Cycle was stopped during the second or a later test and then resumed using the Start Test button, the resume confirmation was handled incorrectly. After selecting to continue, the sequence restarted from the first test instead of continuing from the interrupted test. 2. Increase revision to 3.9.3134.114 Solution: 1. Corrected the Cycle resume logic so that, after confirming continuation, the sequence resumes from the interrupted test instead of restarting from the first test. 2. Increased revision to 3.9.3134.114 --- TBF/Properties/AssemblyInfo.cs | 4 ++-- TBF/Rig/Sequences/MainSeq.cs | 39 ++++++++++++++++++++++++++-------- TBF/UI/MainWnd.resx | 12 +++++------ 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 60f2adf94..3ed6e34bb 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.9.3134.113")] -[assembly: AssemblyFileVersion("3.9.3134.113")] +[assembly: AssemblyVersion("3.9.3134.114")] +[assembly: AssemblyFileVersion("3.9.3134.114")] diff --git a/TBF/Rig/Sequences/MainSeq.cs b/TBF/Rig/Sequences/MainSeq.cs index ae6a22162..3deb46ae4 100644 --- a/TBF/Rig/Sequences/MainSeq.cs +++ b/TBF/Rig/Sequences/MainSeq.cs @@ -863,6 +863,10 @@ namespace TBF.Rig.Sequences /// if (selection == Selection.RestOfCycle) /// ... otherwise { + log.InfoFormat( + "RestOfCycle requested from selectedTestName={0}", + selectedTestName); + for (int i = 0; i < StateMachine.TestInstances.Length; i++) { if (selectedTestName == StateMachine.TestInstances[i].Name) @@ -974,21 +978,38 @@ namespace TBF.Rig.Sequences nextTransitionBefore = null; } - /// Fetch paths and transitions of this test + /// Fetch paths and transitions of this test TestInstance testInst = StateMachine.TestInstances[currentTestIx]; - TBF.Rig.Generic.IComponent testMethodComp = TbfComponents.FindComponent(testInst.Test.Method); + + /// Remember the current test so that "Continue in the cycle" + /// can restart from the interrupted test. + selectedTestName = testInst.Name; + log.InfoFormat( + "Cycle current test: index={0}, name={1}, selectedTestName updated", + currentTestIx, + selectedTestName); + + TBF.Rig.Generic.IComponent testMethodComp = + TbfComponents.FindComponent(testInst.Test.Method); + string errorMsg; - if (!StateMachine.GetPaths(testInst.Test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter), - out inPath, out benchPath, out outPath, out sensPath, + if (!StateMachine.GetPaths(testInst.Test, + (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter), + out inPath, + out benchPath, + out outPath, + out sensPath, out heatMetersPath, - out transitionBefore, out transitionBetween, out transitionAfter, + out transitionBefore, + out transitionBetween, + out transitionAfter, out errorMsg)) { - Bridge.OnError(this, errorMsg); - goto select_cycle_or_test; - } + Bridge.OnError(this, errorMsg); + goto select_cycle_or_test; + } - /// Update format for the water mass + /// Update format for the water mass if (outPath != null && outPath.Scale != null && !string.IsNullOrEmpty(outPath.Scale.Format)) { StartMass.Format = outPath.Scale.Format; diff --git a/TBF/UI/MainWnd.resx b/TBF/UI/MainWnd.resx index 6fe90fc60..dfabf049a 100644 --- a/TBF/UI/MainWnd.resx +++ b/TBF/UI/MainWnd.resx @@ -739,7 +739,7 @@ processTabPageCtrl - TBF.UI.Process.ProcessTabPageCtrl, TBF, Version=3.9.3001.1, Culture=neutral, PublicKeyToken=null + TBF.UI.Process.ProcessTabPageCtrl, TBF, Version=3.9.3134.114, Culture=neutral, PublicKeyToken=null processTabPage @@ -817,7 +817,7 @@ resultsTabPageCtrl - TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=3.9.3001.1, Culture=neutral, PublicKeyToken=null + TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=3.9.3134.112, Culture=neutral, PublicKeyToken=null resultsTabPage @@ -871,7 +871,7 @@ graphsTabPageCtrl - TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=3.9.3001.1, Culture=neutral, PublicKeyToken=null + TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=3.9.3134.112, Culture=neutral, PublicKeyToken=null graphsTabPage @@ -925,7 +925,7 @@ eventLogsTabPageCtrl - TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=3.9.3001.1, Culture=neutral, PublicKeyToken=null + TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=3.9.3134.112, Culture=neutral, PublicKeyToken=null eventLogsTabPage @@ -979,7 +979,7 @@ calendarTabPageCtrl - TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=3.9.3001.1, Culture=neutral, PublicKeyToken=null + TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=3.9.3134.112, Culture=neutral, PublicKeyToken=null calendarTabPage @@ -1033,7 +1033,7 @@ picturesTabPageCtrl - TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=3.9.3001.1, Culture=neutral, PublicKeyToken=null + TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=3.9.3134.112, Culture=neutral, PublicKeyToken=null picturesTabPage