mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 04:58:13 +02:00
added auto stop debugging on close
git-svn-id: trunk@4824 -
This commit is contained in:
parent
aeaf1ae674
commit
07ce085aa7
34
ide/main.pp
34
ide/main.pp
@ -387,6 +387,7 @@ type
|
|||||||
|
|
||||||
protected
|
protected
|
||||||
procedure SetToolStatus(const AValue: TIDEToolStatus); override;
|
procedure SetToolStatus(const AValue: TIDEToolStatus); override;
|
||||||
|
function DoResetToolStatus(Interactive: boolean): boolean;
|
||||||
|
|
||||||
procedure ToolButtonClick(Sender: TObject);
|
procedure ToolButtonClick(Sender: TObject);
|
||||||
procedure OnApplyWindowLayout(ALayout: TIDEWindowLayout);
|
procedure OnApplyWindowLayout(ALayout: TIDEWindowLayout);
|
||||||
@ -1018,6 +1019,12 @@ procedure TMainIDE.MainIDEFormCloseQuery(Sender : TObject;
|
|||||||
var
|
var
|
||||||
MsgResult: integer;
|
MsgResult: integer;
|
||||||
begin
|
begin
|
||||||
|
// stop debugging/compiling/...
|
||||||
|
if not DoResetToolStatus(true) then begin
|
||||||
|
CanClose:=false;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
// check packages
|
// check packages
|
||||||
if (PkgBoss.DoSaveAllPackages([psfAskBeforeSaving])<>mrOk)
|
if (PkgBoss.DoSaveAllPackages([psfAskBeforeSaving])<>mrOk)
|
||||||
or (PkgBoss.DoCloseAllPackageEditors<>mrOk) then begin
|
or (PkgBoss.DoCloseAllPackageEditors<>mrOk) then begin
|
||||||
@ -2187,6 +2194,24 @@ begin
|
|||||||
inherited SetToolStatus(AValue);
|
inherited SetToolStatus(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMainIDE.DoResetToolStatus(Interactive: boolean): boolean;
|
||||||
|
begin
|
||||||
|
Result:=false;
|
||||||
|
case ToolStatus of
|
||||||
|
|
||||||
|
itDebugger:
|
||||||
|
begin
|
||||||
|
if Interactive
|
||||||
|
and (MessageDlg('Stop Debugging?',
|
||||||
|
'Stop the debugging?',mtConfirmation,[mbYes,mbCancel],0)<>mrYes)
|
||||||
|
then exit;
|
||||||
|
DebugBoss.DoStopProject;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
Result:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
|
|
||||||
@ -5194,7 +5219,7 @@ begin
|
|||||||
writeln('TMainIDE.DoSaveProject End');
|
writeln('TMainIDE.DoSaveProject End');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoCloseProject:TModalResult;
|
function TMainIDE.DoCloseProject: TModalResult;
|
||||||
begin
|
begin
|
||||||
{$IFDEF IDE_VERBOSE}
|
{$IFDEF IDE_VERBOSE}
|
||||||
writeln('TMainIDE.DoCloseProject A');
|
writeln('TMainIDE.DoCloseProject A');
|
||||||
@ -5218,8 +5243,8 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoOpenProjectFile(AFileName:string;
|
function TMainIDE.DoOpenProjectFile(AFileName: string;
|
||||||
Flags: TOpenFlags):TModalResult;
|
Flags: TOpenFlags): TModalResult;
|
||||||
var Ext,AText,ACaption: string;
|
var Ext,AText,ACaption: string;
|
||||||
LowestEditorIndex,LowestUnitIndex,LastEditorIndex,i: integer;
|
LowestEditorIndex,LowestUnitIndex,LastEditorIndex,i: integer;
|
||||||
NewBuf: TCodeBuffer;
|
NewBuf: TCodeBuffer;
|
||||||
@ -10140,6 +10165,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.673 2003/11/22 15:47:52 mattias
|
||||||
|
added auto stop debugging on close
|
||||||
|
|
||||||
Revision 1.672 2003/11/22 15:29:20 mattias
|
Revision 1.672 2003/11/22 15:29:20 mattias
|
||||||
added short cmd line params
|
added short cmd line params
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user