Debugger: Watches, "copy name" to take expression from sub-watches

This commit is contained in:
Martin 2022-06-14 22:34:49 +02:00
parent 3c5a7c2742
commit 770127ba3a

View File

@ -759,12 +759,17 @@ end;
procedure TWatchesDlg.actCopyNameExecute(Sender: TObject);
var
Node: PVirtualNode;
AWatch: TIdeWatch;
begin
Node := tvWatches.GetFocusedNode;
if Node = nil then
exit;
Clipboard.Open;
Clipboard.AsText := tvWatches.NodeText[Node, COL_WATCH_EXPR-1];
AWatch := TIdeWatch(tvWatches.NodeItem[Node]);
if AWatch <> nil then
Clipboard.AsText := AWatch.Expression
else
Clipboard.AsText := tvWatches.NodeText[Node, COL_WATCH_EXPR-1];
Clipboard.Close;
end;