mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 02:00:28 +02:00
IdeDebugger: Breakpoint dialog, fix BreakGroups
This commit is contained in:
parent
632c9283b4
commit
46731b05ee
@ -171,7 +171,7 @@ type
|
||||
procedure ClearTree;
|
||||
procedure DoItemRemoved(Sender: TDbgTreeView; AnItem: TObject;
|
||||
ANode: PVirtualNode);
|
||||
function GetNodeForBrkGroup(const ABrkGroup: TIDEBreakPointGroup): PVirtualNode;
|
||||
function GetNodeForBrkGroup(const ABrkGroup: TIDEBreakPointGroup; AOnlyExisting: Boolean = False): PVirtualNode;
|
||||
procedure SetBaseDirectory(const AValue: string);
|
||||
procedure popSetGroupItemClick(Sender: TObject);
|
||||
procedure SetGroup(const NewGroup: TIDEBreakPointGroup);
|
||||
@ -411,7 +411,7 @@ begin
|
||||
GetNodeForBrkGroup(TIDEBreakPointGroup(Data));
|
||||
end;
|
||||
ooDeleteItem: begin
|
||||
VNode :=tvBreakPoints.FindNodeForItem(TObject(Data));
|
||||
VNode := GetNodeForBrkGroup(TIDEBreakPointGroup(Data), True);
|
||||
if VNode <> nil then begin
|
||||
tvBreakPoints.DeleteNode(VNode);
|
||||
end;
|
||||
@ -451,19 +451,22 @@ begin
|
||||
tvBreakPointsChange(nil, nil);
|
||||
end;
|
||||
|
||||
function TBreakPointsDlg.GetNodeForBrkGroup(const ABrkGroup: TIDEBreakPointGroup
|
||||
): PVirtualNode;
|
||||
function TBreakPointsDlg.GetNodeForBrkGroup(
|
||||
const ABrkGroup: TIDEBreakPointGroup; AOnlyExisting: Boolean): PVirtualNode;
|
||||
var
|
||||
PVNode: PVirtualNode;
|
||||
GrpHeader: TBreakpointGroupFrame;
|
||||
begin
|
||||
if ABrkGroup = nil then
|
||||
exit(tvBreakPoints.FindNodeForControl(FUngroupedHeader));
|
||||
exit(FUngroupedHeader.Node);
|
||||
|
||||
for PVNode in tvBreakPoints.ControlNodes do
|
||||
if GetGroupFrame(PVNode).BrkGroup = ABrkGroup then
|
||||
exit(PVNode);
|
||||
|
||||
if AOnlyExisting then
|
||||
exit(nil);
|
||||
|
||||
tvBreakPoints.BeginUpdate;
|
||||
try
|
||||
Result := tvBreakPoints.AddChild(nil, nil);
|
||||
|
Loading…
Reference in New Issue
Block a user