diff --git a/src/Classes/PassiveSpec.lua b/src/Classes/PassiveSpec.lua index 3b2d0ce207..e1e37718ec 100644 --- a/src/Classes/PassiveSpec.lua +++ b/src/Classes/PassiveSpec.lua @@ -913,6 +913,7 @@ function PassiveSpecClass:GetEffectiveAllocationPath(node, altPath) end function PassiveSpecClass:AllocNode(node, altPath) + setSearchForceUpdate() if not node.path then -- Node cannot be connected to the tree as there is no possible path return @@ -972,6 +973,7 @@ end -- Deallocate the given node, and all nodes which depend on it (i.e. which are only connected to the tree through this node) function PassiveSpecClass:DeallocNode(node) + setSearchForceUpdate() for _, depNode in ipairs(node.depends) do -- reset any switched attribute nodes if depNode.isAttribute then diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index 2149899ce6..71b35fd7e8 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -831,10 +831,14 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) self.searchParams = prepSearch(self.searchStr) for nodeId, node in pairs(spec.nodes) do - self.searchStrResults[nodeId] = #self.searchParams > 0 and self:DoesNodeMatchSearchParams(node) + self.searchStrResults[nodeId] = #self.searchParams > 0 and self:DoesNodeMatchSearchParams(build, node) end end + function setSearchForceUpdate() + self.searchNeedsForceUpdate = true + end + if launch.devModeAlt and hoverNode then -- Draw orbits of the group node local groupNode = hoverNode.group @@ -1442,11 +1446,15 @@ function PassiveTreeViewClass:Focus(x, y, viewPort, build) self.zoomY = -y * scale end -function PassiveTreeViewClass:DoesNodeMatchSearchParams(node) +function PassiveTreeViewClass:DoesNodeMatchSearchParams(build, node) if node.type == "ClassStart" or node.type == "OnlyImage" then return end + if node.unlockConstraint and not checkUnlockConstraints(build, node) then + return + end + local needMatches = copyTable(self.searchParams) local err