From 1aade634475cb205b3c241c800046cd3ae695354 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Fri, 29 Aug 2025 11:24:32 +1000 Subject: [PATCH] Add shortcut to copy node text from Passive Tree to the clipboard Copy of https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/8635 --- src/Classes/PassiveTreeView.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index 8a31fc80c7..5c8a6dec3a 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -99,6 +99,12 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) self.showHeatMap = not self.showHeatMap elseif event.key == "d" and IsKeyDown("CTRL") then self.showStatDifferences = not self.showStatDifferences + elseif event.key == "c" and IsKeyDown("CTRL") and self.hoverNode and self.hoverNode.type ~= "Socket" then + local result = "# ".. self.hoverNode.dn .. "\n" + for _, line in ipairs(self.hoverNode.sd) do + result = result .. line .. "\n" + end + Copy(result) elseif event.key == "PAGEUP" then self:Zoom(IsKeyDown("SHIFT") and 3 or 1, viewPort) elseif event.key == "PAGEDOWN" then @@ -1401,6 +1407,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi tooltip:AddLine(14, colorCodes.TIP.."Tip: Hold Shift or Ctrl to hide this tooltip.") else tooltip:AddLine(14, colorCodes.TIP.."Tip: Hold Ctrl to hide this tooltip.") + tooltip:AddLine(14, colorCodes.TIP.."Tip: Press Ctrl+C to copy this node's text.") end end