fix: 定时执行强制启动无法切换基建计划

fix #6757
This commit is contained in:
uye
2023-10-11 16:28:07 +08:00
parent d03d0df13c
commit e32c580c76
2 changed files with 7 additions and 1 deletions

View File

@@ -573,8 +573,13 @@ namespace MaaWpfGui.Main
case AsstMsg.TaskChainCompleted:
switch (taskChain)
{
case "Fight":
Instances.TaskQueueViewModel.FightTaskRunning = false;
break;
case "Infrast":
Instances.TaskQueueViewModel.InfrastTaskRunning = false;
Instances.TaskQueueViewModel.IncreaseCustomInfrastPlanIndex();
Instances.TaskQueueViewModel.RefreshCustomInfrastPlanIndexByPeriod();
break;
case "Mall":
{

View File

@@ -818,6 +818,7 @@ namespace MaaWpfGui.ViewModels.UI
// 虽然更改时已经保存过了,不过保险起见还是在点击开始之后再保存一次任务及基建列表
TaskItemSelectionChanged();
Instances.SettingsViewModel.InfrastOrderSelectionChanged();
RefreshCustomInfrastPlanIndexByPeriod();
ClearLog();
@@ -2623,7 +2624,7 @@ namespace MaaWpfGui.ViewModels.UI
RefreshCustomInfrastPlanIndexByPeriod();
}
private void RefreshCustomInfrastPlanIndexByPeriod()
public void RefreshCustomInfrastPlanIndexByPeriod()
{
if (!CustomInfrastEnabled || !_customInfrastPlanHasPeriod || InfrastTaskRunning)
{