IDE: Disable Project Options command while compiling many build modes. Issue #39332.

(cherry picked from commit 8c248da41d)
This commit is contained in:
Juha 2021-10-04 23:26:08 +03:00 committed by Maxim Ganetsky
parent be49848878
commit 2a120e8c97

View File

@ -39,9 +39,9 @@ uses
// IdeIntf
IDEDialogs, CompOptsIntf, IDEOptionsIntf, LazIDEIntf, IDEImagesIntf,
// IDE
MainBase, BasePkgManager, PackageDefs, Project, CompilerOptions, EnvironmentOpts,
TransferMacros, BaseBuildManager, Compiler_ModeMatrix, BuildModeDiffDlg,
GenericCheckList, IDEProcs, LazarusIDEStrConsts;
MainBase, MainBar, BasePkgManager, PackageDefs, Project, CompilerOptions,
EnvironmentOpts, TransferMacros, BaseBuildManager, Compiler_ModeMatrix,
BuildModeDiffDlg, GenericCheckList, IDEProcs, LazarusIDEStrConsts;
type
@ -358,6 +358,7 @@ begin
ModeList.Add(md);
end;
try
MainIDEBar.itmProjectOptions.Enabled:=False;
// Build first the active mode so we don't have to switch many times.
if BuildActiveMode then
begin
@ -386,6 +387,7 @@ begin
DebugLn('BuildManyModes: Switch back to ActiveMode');
Project1.ActiveBuildMode := ActiveMode;
PrepareForBuild;
MainIDEBar.itmProjectOptions.Enabled:=True;
LazarusIDE.DoSaveProject([]);
if Result then
IDEMessageDialog(lisSuccess, Format(lisSelectedModesWereCompiled, [ModeCnt]),