From 005b441e7d8da5fe8f38d6b1822a5cee87eb341f Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 10 Feb 1999 09:54:11 +0000 Subject: [PATCH] * cmSourceWindowClosing resets Debugger LastSource field to avoid problems --- ide/text/fpide.pas | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ide/text/fpide.pas b/ide/text/fpide.pas index f129aca0ea..3a45964d98 100644 --- a/ide/text/fpide.pas +++ b/ide/text/fpide.pas @@ -135,7 +135,9 @@ begin Desktop^.Insert(ClipboardWindow); New(CalcWindow, Init); CalcWindow^.Hide; Desktop^.Insert(CalcWindow); - New(ProgramInfoWindow, Init); ProgramInfoWindow^.Hide; Desktop^.Insert(ProgramInfoWindow); + New(ProgramInfoWindow, Init); + ProgramInfoWindow^.Hide; + Desktop^.Insert(ProgramInfoWindow); Message(@Self,evBroadcast,cmUpdate,nil); InitTemplates; CurDirChanged; @@ -396,9 +398,14 @@ begin cmUpdate : Update; cmSourceWndClosing : - with PSourceWindow(Event.InfoPtr)^ do - if Editor^.FileName<>'' then - AddRecentFile(Editor^.FileName,Editor^.CurPos.X,Editor^.CurPos.Y); + begin + with PSourceWindow(Event.InfoPtr)^ do + if Editor^.FileName<>'' then + AddRecentFile(Editor^.FileName,Editor^.CurPos.X,Editor^.CurPos.Y); + if assigned(Debugger) and (PView(Event.InfoPtr)=Debugger^.LastSource) then + Debugger^.LastSource:=nil; + end; + end; end; inherited HandleEvent(Event); @@ -647,7 +654,10 @@ end; END. { $Log$ - Revision 1.12 1999-02-08 17:43:44 pierre + Revision 1.13 1999-02-10 09:54:11 pierre + * cmSourceWindowClosing resets Debugger LastSource field to avoid problems + + Revision 1.12 1999/02/08 17:43:44 pierre * RestDebugger or multiple running of debugged program now works + added DoContToCursor(F4) * Breakpoints are now inserted correctly (was mainlyy a problem