Merge pull request #185 from msanatan/fix-on-focus-config-check

Fix on focus config check
main
Shutong Wu 2025-08-01 23:42:55 -04:00 committed by GitHub
commit eabf727894
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -58,10 +58,10 @@ namespace UnityMcpBridge.Editor.Windows
private void OnFocus()
{
// Refresh configuration status when window gains focus
foreach (McpClient mcpClient in mcpClients.clients)
if (mcpClients.clients.Count > 0 && selectedClientIndex < mcpClients.clients.Count)
{
CheckMcpConfiguration(mcpClient);
McpClient selectedClient = mcpClients.clients[selectedClientIndex];
CheckMcpConfiguration(selectedClient);
}
Repaint();
}