mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 12:19:57 +02:00
IDE: Fix cancelling BuildMode when done through "Change build mode" tool button. Issue #36736, patch from errno.
git-svn-id: trunk@62679 -
This commit is contained in:
parent
8f44d34808
commit
42beb70c91
@ -5222,7 +5222,6 @@ begin
|
||||
//ActiveSrcEdit:=nil;
|
||||
//BeginCodeTool(ActiveSrcEdit, ActiveUnitInfo, []);
|
||||
Project1.BackupSession;
|
||||
Project1.BackupBuildModes;
|
||||
Project1.UpdateExecutableType;
|
||||
Project1.UseAsDefault := False;
|
||||
TProjectIDEOptions(Sender).CheckLclApp;
|
||||
@ -5236,10 +5235,7 @@ begin
|
||||
if not (Sender is TProjectIDEOptions) then exit;
|
||||
Assert(Assigned(TProjectIDEOptions(Sender).Project), 'TMainIDE.ProjectOptionsAfterWrite: Project=Nil.');
|
||||
if Restore then
|
||||
begin
|
||||
Project1.RestoreBuildModes;
|
||||
Project1.RestoreSession;
|
||||
end
|
||||
Project1.RestoreSession
|
||||
else begin
|
||||
if Project1.MainUnitID >= 0 then
|
||||
begin
|
||||
|
@ -513,6 +513,8 @@ type
|
||||
FProject: TProject;
|
||||
FCompileReasons: TCompileReasons;
|
||||
procedure InvalidateOptions;
|
||||
procedure AfterWriteExec(Sender: TObject; Restore: boolean);
|
||||
procedure BeforeReadExec(Sender: TObject);
|
||||
protected
|
||||
procedure SetTargetCPU(const AValue: string); override;
|
||||
procedure SetTargetOS(const AValue: string); override;
|
||||
@ -6301,6 +6303,18 @@ begin
|
||||
//if (LazProject=nil) then exit;
|
||||
end;
|
||||
|
||||
procedure TProjectCompilerOptions.AfterWriteExec(Sender:TObject;Restore:boolean);
|
||||
begin
|
||||
if Restore and (LazProject<>nil) then
|
||||
LazProject.RestoreBuildModes;
|
||||
end;
|
||||
|
||||
procedure TProjectCompilerOptions.BeforeReadExec(Sender:TObject);
|
||||
begin
|
||||
if LazProject<>nil then
|
||||
LazProject.BackupBuildModes;
|
||||
end;
|
||||
|
||||
procedure TProjectCompilerOptions.SetAlternativeCompile(const Command: string;
|
||||
ScanFPCMsgs: boolean);
|
||||
begin
|
||||
@ -6325,6 +6339,8 @@ begin
|
||||
if AOwner <> nil then
|
||||
FProject := AOwner as TProject;
|
||||
ParsedOpts.OnLocalSubstitute:=@SubstituteProjectMacros;
|
||||
OnAfterWrite:=@AfterWriteExec;
|
||||
OnBeforeRead:=@BeforeReadExec;
|
||||
end;
|
||||
|
||||
destructor TProjectCompilerOptions.Destroy;
|
||||
|
Loading…
Reference in New Issue
Block a user