mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 09:39:07 +02:00
IDE: Disable Project Options toolbuttons while compiling many build modes. Issue #39332.
(cherry picked from commit e67c74ed7e
)
This commit is contained in:
parent
abcf52816b
commit
ad4610e5ec
@ -4415,7 +4415,9 @@ procedure TMainIDE.ProjectOptionsHelper(const AFilter: array of TAbstractIDEOpti
|
||||
var
|
||||
Capt: String;
|
||||
begin
|
||||
if Project1=nil then exit;
|
||||
// This is not called only through ecProjectOptions command. Test for Enabled.
|
||||
if (Project1=nil) or not MainIDEBar.itmProjectOptions.Enabled then exit;
|
||||
|
||||
// This is kind of a hack. Copy OtherDefines from project to current
|
||||
// buildmode's compiler options and then back after they are modified.
|
||||
// Only needed for projects, because packages don't have buildmodes.
|
||||
@ -6541,7 +6543,6 @@ begin
|
||||
if ProjInspector=nil then begin
|
||||
IDEWindowCreators.CreateForm(ProjInspector,TProjectInspectorForm,
|
||||
State=iwgfDisabled,LazarusIDE.OwningComponent);
|
||||
ProjInspector.OnShowOptions:=@mnuProjectOptionsClicked;
|
||||
ProjInspector.OnAddUnitToProject:=@ProjInspectorAddUnitToProject;
|
||||
ProjInspector.OnAddDependency:=@PkgBoss.ProjectInspectorAddDependency;
|
||||
ProjInspector.OnRemoveFile:=@ProjInspectorRemoveFile;
|
||||
|
@ -70,7 +70,7 @@ uses
|
||||
// IDEIntf
|
||||
IDEHelpIntf, IDECommands, IDEDialogs, IDEImagesIntf, LazIDEIntf, ToolBarIntf,
|
||||
// IDE
|
||||
LazarusIDEStrConsts, MainBase, IDEProcs, DialogProcs, IDEOptionDefs, Project,
|
||||
LazarusIDEStrConsts, MainBase, MainBar, IDEProcs, DialogProcs, IDEOptionDefs, Project,
|
||||
InputHistory, TransferMacros, EnvironmentOpts, BuildManager, BasePkgManager,
|
||||
ProjPackChecks, ProjPackEditing, ProjPackFilePropGui, PackageDefs,
|
||||
AddToProjectDlg, AddPkgDependencyDlg, AddFPMakeDependencyDlg, LResources;
|
||||
@ -158,7 +158,6 @@ type
|
||||
FOnReAddDependency: TAddProjInspDepEvent;
|
||||
FOnRemoveDependency: TRemoveProjInspDepEvent;
|
||||
FOnRemoveFile: TRemoveProjInspFileEvent;
|
||||
FOnShowOptions: TNotifyEvent;
|
||||
FShowDirectoryHierarchy: boolean;
|
||||
FSortAlphabetically: boolean;
|
||||
FUpdateLock: integer;
|
||||
@ -236,7 +235,6 @@ type
|
||||
function TVNodeRequiredPackages: TTreeNode;
|
||||
public
|
||||
property LazProject: TProject read FLazProject write SetLazProject;
|
||||
property OnShowOptions: TNotifyEvent read FOnShowOptions write FOnShowOptions;
|
||||
property OnAddUnitToProject: TOnAddUnitToProject read FOnAddUnitToProject
|
||||
write FOnAddUnitToProject;
|
||||
property OnAddDependency: TAddProjInspDepEvent
|
||||
@ -976,7 +974,7 @@ end;
|
||||
|
||||
procedure TProjectInspectorForm.OptionsBitBtnClick(Sender: TObject);
|
||||
begin
|
||||
if Assigned(OnShowOptions) then OnShowOptions(Self);
|
||||
MainIDEBar.itmProjectOptions.DoOnClick;
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.HelpBitBtnClick(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user