[ui] GraphEditor: Search indexes remain at null when no filtered nodes exist as per search text

This commit is contained in:
waaake 2024-11-30 13:44:51 +01:00
parent 2b538c235e
commit 49b1e897ac

View file

@ -1142,6 +1142,9 @@ Item {
/**
* Moves the navigation index forwards and focuses on the next node as per index.
*/
if (!filteredNodes.count)
return
navigation.currentIndex++
if (navigation.currentIndex === filteredNodes.count)
navigation.currentIndex = 0
@ -1152,6 +1155,9 @@ Item {
/**
* Moves the navigation index backwards and focuses on the previous node as per index.
*/
if (!filteredNodes.count)
return
navigation.currentIndex--
if (navigation.currentIndex === -1)
navigation.currentIndex = filteredNodes.count - 1