mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 15:29:59 +02:00
IDE: Hide IDE windows on "Run without Debugging" when the setting says so. Issue #39567.
This commit is contained in:
parent
e210c73735
commit
9eaf4e3531
11
ide/main.pp
11
ide/main.pp
@ -813,8 +813,8 @@ type
|
||||
function DoRunProject: TModalResult; override;
|
||||
function DoRunProjectWithoutDebug: TModalResult; override;
|
||||
function DoSaveProjectToTestDirectory(Flags: TSaveFlags): TModalResult;
|
||||
procedure RunFinished(Sender: TObject);
|
||||
function QuitIDE: boolean;
|
||||
|
||||
// edit menu
|
||||
procedure DoCommand(ACommand: integer); override;
|
||||
procedure DoSourceEditorCommand(EditorCommand: integer;
|
||||
@ -7389,8 +7389,11 @@ begin
|
||||
Exit(mrNone);
|
||||
end;
|
||||
|
||||
AddHandlerOnRunFinished(@RunFinished);
|
||||
Project1.RunParameterOptions.AssignEnvironmentTo(Process.Environment);
|
||||
try
|
||||
if EnvironmentOptions.Desktop.HideIDEOnRun then
|
||||
HideIDE;
|
||||
TNotifyProcessEnd.Create(Process, @DoCallRunFinishedHandler);
|
||||
Process:=nil; // Process is freed by TNotifyProcessEnd
|
||||
except
|
||||
@ -7403,6 +7406,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.RunFinished(Sender: TObject);
|
||||
begin
|
||||
if EnvironmentOptions.Desktop.HideIDEOnRun then
|
||||
UnhideIDE;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.DoRestart;
|
||||
|
||||
{$ifdef darwin}
|
||||
|
Loading…
Reference in New Issue
Block a user