From 63ed62f6d4813bc00a03a5cf0e677ba53c8a8bc8 Mon Sep 17 00:00:00 2001 From: status102 Date: Tue, 12 Dec 2023 19:12:16 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=A7=BB=E9=99=A4CheckBox=E5=8F=B3?= =?UTF-8?q?=E9=94=AE=E9=A2=9D=E5=A4=96=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserControl/FightSettingsUserControl.xaml | 16 +++++++++++----- .../UserControl/FightSettingsUserControl.xaml.cs | 10 ---------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/MaaWpfGui/Views/UserControl/FightSettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/FightSettingsUserControl.xaml index bc0f8ab6eb..b3ef886839 100644 --- a/src/MaaWpfGui/Views/UserControl/FightSettingsUserControl.xaml +++ b/src/MaaWpfGui/Views/UserControl/FightSettingsUserControl.xaml @@ -6,6 +6,7 @@ xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:hc="https://handyorg.github.io/handycontrol" + xmlns:helper="clr-namespace:MaaWpfGui.Helper" xmlns:local="clr-namespace:MaaWpfGui" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:s="https://github.com/canton7/Stylet" @@ -36,16 +37,19 @@ VerticalContentAlignment="Center" Content="{DynamicResource UseSanityPotion}" IsChecked="{Binding UseMedicineWithNull}" - MouseRightButtonDown="ToggleCheckBoxNullOnRightClick" + MouseRightButtonUp="{s:Action ToggleCheckBoxNullOnRightClick, + Target={x:Type helper:CheckBoxHelper}}" ToolTip="{DynamicResource CheckBoxesNotSavedAsNull}" /> @@ -104,7 +109,8 @@ VerticalContentAlignment="Center" Content="{DynamicResource AssignedMaterial}" IsChecked="{Binding IsSpecifiedDropsWithNull}" - MouseRightButtonDown="ToggleCheckBoxNullOnRightClick" + MouseRightButtonUp="{s:Action ToggleCheckBoxNullOnRightClick, + Target={x:Type helper:CheckBoxHelper}}" ToolTip="{DynamicResource NoAutoNavigation}" />