From 59c7354b08a2ca9c3f06895aece7475b1af9ea25 Mon Sep 17 00:00:00 2001 From: Yuriko Yamauchi Date: Tue, 24 Oct 2023 14:39:27 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=82=AB=E3=83=83=E3=83=88=E3=82=AD=E3=83=BC=E3=82=92=E5=88=9D?= =?UTF-8?q?=E6=9C=9F=E5=80=A4=E3=81=AB=E6=88=BB=E3=81=99=E9=9A=9B=E3=81=AB?= =?UTF-8?q?=E3=80=81=E8=A1=9D=E7=AA=81=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=92=E8=A1=8C=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HotkeySettingDialog.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/HotkeySettingDialog.vue b/src/components/HotkeySettingDialog.vue index 983bd1a624..1fa51c48cb 100644 --- a/src/components/HotkeySettingDialog.vue +++ b/src/components/HotkeySettingDialog.vue @@ -361,9 +361,20 @@ const resetHotkey = async (action: string) => { .getDefaultHotkeySettings() .then((defaultSettings: HotkeySetting[]) => { const setting = defaultSettings.find((value) => value.action == action); - if (setting) { - changeHotkeySettings(action, setting.combination); + if (setting === undefined) { + return; } + // デフォルトが未設定でない場合は、衝突チェックを行う + if (setting.combination) { + const duplicated = hotkeySettings.value.find((item) => + item.combination == setting.combination && item.action != action); + if (duplicated !== undefined) { + openHotkeyDialog(action); + lastRecord.value = duplicated.combination; + return; + } + } + changeHotkeySettings(action, setting.combination); }); } }; From ea66e123127f54a5857cfd33446e043abc933a4e Mon Sep 17 00:00:00 2001 From: Yuriko Yamauchi Date: Wed, 25 Oct 2023 13:22:50 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=83=E3=83=88=E3=82=92=E6=95=B4?= =?UTF-8?q?=E3=81=88=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HotkeySettingDialog.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/HotkeySettingDialog.vue b/src/components/HotkeySettingDialog.vue index 1fa51c48cb..fdd98b0ba3 100644 --- a/src/components/HotkeySettingDialog.vue +++ b/src/components/HotkeySettingDialog.vue @@ -366,8 +366,10 @@ const resetHotkey = async (action: string) => { } // デフォルトが未設定でない場合は、衝突チェックを行う if (setting.combination) { - const duplicated = hotkeySettings.value.find((item) => - item.combination == setting.combination && item.action != action); + const duplicated = hotkeySettings.value.find( + (item) => + item.combination == setting.combination && item.action != action + ); if (duplicated !== undefined) { openHotkeyDialog(action); lastRecord.value = duplicated.combination;