Skip to content

Commit 812f5f3

Browse files
authored
Adding Shortcut to Copy Paste Tree Node (#8635)
1 parent f7cc078 commit 812f5f3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Classes/PassiveTreeView.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
114114
self.showHeatMap = not self.showHeatMap
115115
elseif event.key == "d" and IsKeyDown("CTRL") then
116116
self.showStatDifferences = not self.showStatDifferences
117+
elseif event.key == "c" and IsKeyDown("CTRL") and self.hoverNode and self.hoverNode.type ~= "Socket" then
118+
local result = "# ".. self.hoverNode.dn .. "\n"
119+
for _, line in ipairs(self.hoverNode.sd) do
120+
result = result .. line .. "\n"
121+
end
122+
Copy(result)
117123
elseif event.key == "PAGEUP" then
118124
self:Zoom(IsKeyDown("SHIFT") and 3 or 1, viewPort)
119125
elseif event.key == "PAGEDOWN" then
@@ -1166,5 +1172,6 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build)
11661172
tooltip:AddLine(14, colorCodes.TIP.."Tip: Hold Shift or Ctrl to hide this tooltip.")
11671173
else
11681174
tooltip:AddLine(14, colorCodes.TIP.."Tip: Hold Ctrl to hide this tooltip.")
1175+
tooltip:AddLine(14, colorCodes.TIP.."Tip: Press Ctrl+C to copy this node's text.")
11691176
end
11701177
end

0 commit comments

Comments
 (0)