diff --git a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs index 0f007d0829..c708ecc713 100644 --- a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs @@ -44,7 +44,6 @@ using Stylet; using static MaaWpfGui.Helper.CopilotHelper; using static MaaWpfGui.Helper.PathsHelper; using static MaaWpfGui.Models.AsstTasks.AsstCopilotTask; -using static Microsoft.WindowsAPICodePack.Shell.PropertySystem.SystemProperties.System; using DataFormats = System.Windows.Forms.DataFormats; using Task = System.Threading.Tasks.Task; @@ -243,6 +242,11 @@ public partial class CopilotViewModel : Screen return; } + if (value == 1 || value == 3) + { + UseCopilotList = false; + } + if (!SetAndNotify(ref _copilotTabIndex, value)) { return; @@ -703,14 +707,7 @@ public partial class CopilotViewModel : Screen [PropertyDependsOn(nameof(CopilotTabIndex))] public bool UseCopilotList { - get { - if (CopilotTabIndex is 1 or 3) - { - return false; - } - return _useCopilotList; - } - + get => _useCopilotList; set { if (value) {