fix error when changing selected box with arrow keys

This commit is contained in:
Saas
2025-09-15 22:46:56 +02:00
parent 187592b673
commit 4d77646f26
@@ -777,11 +777,8 @@ namespace FlaxEditor.Surface
if (selectedBox != null)
{
Box toSelect = null;
if ((key == KeyboardKeys.ArrowRight && selectedBox.IsOutput) || (key == KeyboardKeys.ArrowLeft && !selectedBox.IsOutput))
if (((key == KeyboardKeys.ArrowRight && selectedBox.IsOutput) || (key == KeyboardKeys.ArrowLeft && !selectedBox.IsOutput)) && selectedBox.HasAnyConnection)
{
if (_selectedConnectionIndex < 0 || _selectedConnectionIndex >= selectedBox.Connections.Count)
_selectedConnectionIndex = 0;
toSelect = selectedBox.Connections[_selectedConnectionIndex];
}
else