Restore assembly pick focus with space
This commit is contained in:
parent
2b6f54898a
commit
ad8d86e79f
@ -43,17 +43,17 @@ namespace NavisworksTransport
|
||||
if (key == 32) // 空格键
|
||||
{
|
||||
var pathManager = PathPlanningManager.GetActivePathManager();
|
||||
if (pathManager != null &&
|
||||
(pathManager.PathEditState == PathEditState.Creating ||
|
||||
pathManager.PathEditState == PathEditState.AddingPoints ||
|
||||
pathManager.PathEditState == PathEditState.EditingPoint))
|
||||
if (pathManager != null)
|
||||
{
|
||||
var currentTool = Application.MainDocument.Tool.Value;
|
||||
if (currentTool != Tool.CustomToolPlugin)
|
||||
{
|
||||
LogManager.Info($"[InputMonitor] 用户按空格键,当前工具为{currentTool},重新激活工具");
|
||||
pathManager.ReactivateToolPlugin();
|
||||
return true;
|
||||
LogManager.Info($"[InputMonitor] 用户按空格键,当前工具为{currentTool},强制恢复ToolPlugin焦点");
|
||||
bool restored = pathManager.ForceReinitializeToolPlugin(subscribeToEvents: false);
|
||||
if (restored)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -67,4 +67,4 @@ namespace NavisworksTransport
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user