mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 20:34:01 +02:00
IDE: Disable Build-buttons in Configure Build Lazarus dlg when the IDE already compiles. Issue #26884.
This commit is contained in:
parent
b1e6affa83
commit
e17301cab0
@ -154,6 +154,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure CopyProfileToUI(AProfile: TBuildLazarusProfile);
|
||||
procedure CopyUIToProfile(AProfile: TBuildLazarusProfile);
|
||||
procedure DisableCompilation;
|
||||
procedure UpdateProfileNamesUI;
|
||||
end;
|
||||
|
||||
@ -196,7 +197,8 @@ type
|
||||
function PrepareTargetDir(Flags: TBuildLazarusFlags): TModalResult;
|
||||
public
|
||||
constructor Create;
|
||||
function ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
||||
function ShowConfigBuildLazDlg(AProfiles: TBuildLazarusProfiles;
|
||||
ADisableCompilation: Boolean): TModalResult;
|
||||
function MakeLazarus(Profile: TBuildLazarusProfile; Flags: TBuildLazarusFlags): TModalResult;
|
||||
function IsWriteProtected(Profile: TBuildLazarusProfile): Boolean;
|
||||
function SaveIDEMakeOptions(Profile: TBuildLazarusProfile; Flags: TBuildLazarusFlags): TModalResult;
|
||||
@ -235,7 +237,8 @@ begin
|
||||
fMacros:=GlobalMacroList;
|
||||
end;
|
||||
|
||||
function TLazarusBuilder.ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
||||
function TLazarusBuilder.ShowConfigBuildLazDlg(AProfiles: TBuildLazarusProfiles;
|
||||
ADisableCompilation: Boolean): TModalResult;
|
||||
// mrOk=save
|
||||
// mrYes=save and compile
|
||||
// mrAll=save and compile all selected profiles
|
||||
@ -247,6 +250,8 @@ begin
|
||||
try
|
||||
ConfigBuildLazDlg.fBuilder := Self;
|
||||
ConfigBuildLazDlg.fProfiles.Assign(AProfiles); // Copy profiles to dialog.
|
||||
if ADisableCompilation then
|
||||
ConfigBuildLazDlg.DisableCompilation;
|
||||
Result := ConfigBuildLazDlg.ShowModal;
|
||||
if Result in [mrOk,mrYes,mrAll] then
|
||||
AProfiles.Assign(ConfigBuildLazDlg.fProfiles); // Copy profiles back from dialog.
|
||||
@ -1228,6 +1233,12 @@ begin
|
||||
AProfile.Defines.Add(DefinesListBox.Items[i]);
|
||||
end;
|
||||
|
||||
procedure TConfigureBuildLazarusDlg.DisableCompilation;
|
||||
begin
|
||||
CompileButton.Enabled:=False;
|
||||
CompileAdvancedButton.Enabled:=False;
|
||||
end;
|
||||
|
||||
procedure TConfigureBuildLazarusDlg.UpdateProfileNamesUI;
|
||||
var
|
||||
i: Integer;
|
||||
|
@ -4864,7 +4864,8 @@ begin
|
||||
fBuilder:=TLazarusBuilder.Create; // Will be freed in the very end.
|
||||
MainBuildBoss.SetBuildTargetIDE;
|
||||
try
|
||||
DlgResult:=fBuilder.ShowConfigureBuildLazarusDlg(MiscellaneousOptions.BuildLazProfiles);
|
||||
DlgResult:=fBuilder.ShowConfigBuildLazDlg(MiscellaneousOptions.BuildLazProfiles,
|
||||
ToolStatus in [itDebugger,itBuilder]);
|
||||
finally
|
||||
MainBuildBoss.SetBuildTargetProject1(true);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user