fix #196 - breakpoint always inserted if BP registry contains...

...a ref to an unsaved document
This commit is contained in:
Basile Burg 2017-10-28 09:36:22 +02:00
parent d8c60b41a5
commit 38b651f404
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 13 additions and 7 deletions

View File

@ -1416,15 +1416,21 @@ begin
fDoc := document;
if fGdbState = gsNone then
updateDebugeeOptionsEditor;
fSynchronizingBreakpoints:= true;
if fSynchronizedDocuments.IndexOf(document.fileName) = -1 then
for i:= 0 to fBreakPoints.count-1 do
if (fDoc.fileName <> '<new document>') then
begin
b := fBreakPoints.item[i];
if b.filename = fDoc.fileName then
fDoc.addBreakpoint(b.line);
fSynchronizingBreakpoints:= true;
if fSynchronizedDocuments.IndexOf(document.fileName) = -1 then
begin
fSynchronizedDocuments.Add(document.fileName);
for i:= 0 to fBreakPoints.count-1 do
begin
b := fBreakPoints.item[i];
if b.filename = fDoc.fileName then
fDoc.addBreakpoint(b.line);
end;
end;
fSynchronizingBreakpoints:= false;
end;
fSynchronizingBreakpoints:= false;
end;
procedure TCEGdbWidget.docChanged(document: TCESynMemo);