Debugger: Watches, fix drag/drop new index

This commit is contained in:
Martin 2022-06-16 12:33:08 +02:00
parent 2e08d4c01a
commit f5984e214f

View File

@ -520,8 +520,11 @@ begin
if Target <> nil then begin
ATargetWatch := TIdeWatch(tvWatches.NodeItem[Target]);
assert(ATargetWatch <> nil, 'TWatchesDlg.tvWatchesDragDrop: ATargetWatch <> nil');
if ATargetWatch <> nil then
NewIdx := ATargetWatch.Index+1;
if ATargetWatch <> nil then begin
NewIdx := ATargetWatch.Index;
if NewIdx < AWatch.Index then
inc(NewIdx);
end;
end;
AWatch.Index := NewIdx;
end;