mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 08:09:16 +02:00
IDE: moved projec option UseAsDefault from TBaseCompilerOptions to TProject
git-svn-id: trunk@34552 -
This commit is contained in:
parent
4244e9702c
commit
c5de3503fb
@ -435,7 +435,6 @@ type
|
||||
fInheritedOptParseStamps: integer;
|
||||
FParsedOpts: TParsedCompilerOptions;
|
||||
FStorePathDelim: TPathDelimSwitch;
|
||||
FUseAsDefault: Boolean;
|
||||
|
||||
// Compilation
|
||||
fExecuteBefore: TCompilationToolOptions;
|
||||
@ -578,9 +577,6 @@ type
|
||||
property DefaultMakeOptionsFlags: TCompilerCmdLineOptions
|
||||
read FDefaultMakeOptionsFlags write SetDefaultMakeOptionsFlags;
|
||||
|
||||
// for dialog only (used to store options once)
|
||||
property UseAsDefault: Boolean read FUseAsDefault write FUseAsDefault;
|
||||
|
||||
// stored properties
|
||||
property StorePathDelim: TPathDelimSwitch read FStorePathDelim write FStorePathDelim;
|
||||
|
||||
|
@ -776,10 +776,14 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCompilerPathOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
ProjCompOpts: TProjectCompilerOptions;
|
||||
begin
|
||||
if AOptions is TProjectCompilerOptions then begin
|
||||
TProjectCompilerOptions(AOptions).TargetFilename:=ProjTargetFileEdit.Text;
|
||||
TProjectCompilerOptions(AOptions).TargetFilenameApplyConventions:=ProjTargetApplyConventionsCheckBox.Checked;
|
||||
ProjCompOpts:=TProjectCompilerOptions(AOptions);
|
||||
ProjCompOpts.TargetFilename:=ProjTargetFileEdit.Text;
|
||||
ProjCompOpts.TargetFilenameApplyConventions:=ProjTargetApplyConventionsCheckBox.Checked;
|
||||
ProjCompOpts.LazProject.UseAsDefault := chkUseAsDefault.Checked;
|
||||
end;
|
||||
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
@ -790,7 +794,6 @@ begin
|
||||
SrcPath := OtherSourcesEdit.Text;
|
||||
UnitOutputDirectory := UnitOutputDirEdit.Text;
|
||||
DebugPath := DebugPathEdit.Text;
|
||||
UseAsDefault := chkUseAsDefault.Checked;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -5019,7 +5019,7 @@ begin
|
||||
AProject.BackupSession;
|
||||
AProject.BackupBuildModes;
|
||||
AProject.UpdateExecutableType;
|
||||
AProject.CompilerOptions.UseAsDefault := False;
|
||||
AProject.UseAsDefault := False;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.DoProjectOptionsAfterWrite(Sender: TObject; Restore: boolean);
|
||||
@ -5128,7 +5128,7 @@ begin
|
||||
AProject.RestoreBuildModes;
|
||||
IncreaseCompilerParseStamp;
|
||||
MainBuildBoss.SetBuildTargetProject1(false);
|
||||
if (not Restore) and AProject.CompilerOptions.UseAsDefault then
|
||||
if (not Restore) and AProject.UseAsDefault then
|
||||
begin
|
||||
aFilename:=AppendPathDelim(GetPrimaryConfigPath)+DefaultProjectCompilerOptionsFilename;
|
||||
AProject.CompilerOptions.SaveToFile(aFilename);
|
||||
@ -10559,7 +10559,7 @@ begin
|
||||
CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'ProjPath']:=
|
||||
VirtualDirectory;
|
||||
|
||||
// create new project (TProject will automatically create the mainunit)
|
||||
// create new project
|
||||
|
||||
Project1:=CreateProjectObject(ProjectDesc,ProjectDescriptorProgram);
|
||||
try
|
||||
|
@ -799,6 +799,7 @@ type
|
||||
FStorePathDelim: TPathDelimSwitch;
|
||||
FUnitList: TFPList; // list of _all_ units (TUnitInfo)
|
||||
FUpdateLock: integer;
|
||||
FUseAsDefault: Boolean;
|
||||
function GetAllEditorsInfo(Index: Integer): TUnitEditorInfo;
|
||||
function GetFirstAutoRevertLockedUnit: TUnitInfo;
|
||||
function GetFirstLoadedUnit: TUnitInfo;
|
||||
@ -1105,6 +1106,7 @@ type
|
||||
read GetTargetFilename write SetTargetFilename;
|
||||
property Units[Index: integer]: TUnitInfo read GetUnits;
|
||||
property UpdateLock: integer read FUpdateLock;
|
||||
property UseAsDefault: Boolean read FUseAsDefault write FUseAsDefault; // for dialog only (used to store options once)
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user