fix:issue #141
This commit is contained in:
@@ -763,39 +763,9 @@ namespace Ink_Canvas.Helpers
|
|||||||
{
|
{
|
||||||
// 在鼠标模式下设置事件处理状态
|
// 在鼠标模式下设置事件处理状态
|
||||||
e.Handled = false;
|
e.Handled = false;
|
||||||
|
|
||||||
// 调用快捷键状态更新方法
|
|
||||||
UpdateHotkeyRegistrationState();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 动态管理快捷键
|
|
||||||
/// </summary>
|
|
||||||
public void UpdateHotkeyRegistrationState()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
bool isMouseMode = IsInSelectMode();
|
|
||||||
|
|
||||||
if (isMouseMode)
|
|
||||||
{
|
|
||||||
// 在鼠标模式下
|
|
||||||
if (_hotkeysShouldBeRegistered)
|
|
||||||
{
|
|
||||||
EnableHotkeyRegistration();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 快捷键已经处于放行状态
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogToFile($"更新快捷键注册状态时出错: {ex.Message}", LogHelper.LogType.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IDisposable Implementation
|
#region IDisposable Implementation
|
||||||
|
|||||||
Reference in New Issue
Block a user