fix(wpf): 自动战斗鼠标长按分页时, 可能会反复触发切换

This commit is contained in:
status102
2026-04-11 17:23:27 +08:00
parent c825f823de
commit d44cd057a4

View File

@@ -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)
{