From a11cde83ffd09f3b78630e6adf65e4ff737ef2ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81d=C3=A1m=20Kov=C3=A1cs?= Date: Wed, 15 Feb 2023 20:30:08 +0100 Subject: [PATCH] Fix commands not start --- src/Core/FileTime.Core.Timeline/CommandScheduler.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Core/FileTime.Core.Timeline/CommandScheduler.cs b/src/Core/FileTime.Core.Timeline/CommandScheduler.cs index 3d4d39b..83478f8 100644 --- a/src/Core/FileTime.Core.Timeline/CommandScheduler.cs +++ b/src/Core/FileTime.Core.Timeline/CommandScheduler.cs @@ -91,10 +91,13 @@ public class CommandScheduler : ICommandScheduler var commandsToExecute = _commandsToRun.Items.FirstOrDefault()?.CommandsCollection.Collection; if (commandsToExecute is null || commandsToExecute.All(c => c.ExecutionState != ExecutionState.Initializing && c.ExecutionState != ExecutionState.Waiting)) return; - foreach (var commandToExecute in commandsToExecute) { - if (commandToExecute.ExecutionState != ExecutionState.Waiting) continue; + if (commandToExecute.ExecutionState != ExecutionState.Waiting + && commandToExecute.ExecutionState != ExecutionState.Initializing ) + { + continue; + } var commandExecutor = GetCommandExecutor();