IDE: reset BuildTarget after project options

git-svn-id: trunk@27623 -
This commit is contained in:
mattias 2010-10-08 16:51:29 +00:00
parent 3d26d69da8
commit 86d16f0a51
3 changed files with 13 additions and 3 deletions

View File

@ -548,6 +548,7 @@ type
procedure SetTargetProc(const AValue: string); override; procedure SetTargetProc(const AValue: string); override;
procedure SetTargetOS(const AValue: string); override; procedure SetTargetOS(const AValue: string); override;
procedure SetTargetFilename(const AValue: String); override; procedure SetTargetFilename(const AValue: String); override;
procedure SetLCLWidgetType(const AValue: string); override;
procedure SetModified(const AValue: boolean); override; procedure SetModified(const AValue: boolean); override;
protected protected
procedure ClearInheritedOptions; procedure ClearInheritedOptions;
@ -1220,6 +1221,14 @@ begin
IncreaseChangeStamp; IncreaseChangeStamp;
end; end;
procedure TBaseCompilerOptions.SetLCLWidgetType(const AValue: string);
begin
if LCLWidgetType=AValue then exit;
inherited SetLCLWidgetType(AValue);
if ParsedOpts.InvalidateParseOnChange then
IncreaseBuildMacroChangeStamp;
end;
function TBaseCompilerOptions.GetCompilerPath: String; function TBaseCompilerOptions.GetCompilerPath: String;
begin begin
Result:=ParsedOpts.UnparsedValues[pcosCompilerPath]; Result:=ParsedOpts.UnparsedValues[pcosCompilerPath];

View File

@ -4269,8 +4269,7 @@ begin
end; end;
procedure TMainIDE.DoOpenIDEOptions(AEditor: TAbstractIDEOptionsEditorClass = nil; procedure TMainIDE.DoOpenIDEOptions(AEditor: TAbstractIDEOptionsEditorClass = nil;
ACaption: String = ''; ACaption: String = ''; AOptionsFilter: TAbstractIDEOptionsClass = nil);
AOptionsFilter: TAbstractIDEOptionsClass = nil);
var var
IDEOptionsDialog: TIDEOptionsDialog; IDEOptionsDialog: TIDEOptionsDialog;
begin begin
@ -4296,6 +4295,8 @@ begin
end; end;
if IDEOptionsDialog.ShowModal = mrOk then begin if IDEOptionsDialog.ShowModal = mrOk then begin
IDEOptionsDialog.WriteAll; IDEOptionsDialog.WriteAll;
MainBuildBoss.SetBuildTarget(MainBuildBoss.GetTargetOS(false),
MainBuildBoss.GetTargetCPU(false),MainBuildBoss.GetLCLWidgetType(false));
UpdateHighlighters(True); UpdateHighlighters(True);
SourceEditorManager.ReloadEditorOptions; SourceEditorManager.ReloadEditorOptions;
if EnvironmentOptions.SingleTaskBarButton then if EnvironmentOptions.SingleTaskBarButton then

View File

@ -140,7 +140,6 @@ type
procedure SetIncludeAssertionCode(const AValue: Boolean); procedure SetIncludeAssertionCode(const AValue: Boolean);
procedure SetInitConst(const AValue: Boolean); procedure SetInitConst(const AValue: Boolean);
procedure SetIOChecks(const AValue: Boolean); procedure SetIOChecks(const AValue: Boolean);
procedure SetLCLWidgetType(const AValue: string);
procedure SetLinkSmart(const AValue: Boolean); procedure SetLinkSmart(const AValue: Boolean);
procedure SetOptLevel(const AValue: Integer); procedure SetOptLevel(const AValue: Integer);
procedure SetOverflowChecks(const AValue: Boolean); procedure SetOverflowChecks(const AValue: Boolean);
@ -295,6 +294,7 @@ type
procedure SetTargetProc(const AValue: string); virtual; abstract; procedure SetTargetProc(const AValue: string); virtual; abstract;
procedure SetUnitOutputDir(const AValue: string); virtual; abstract; procedure SetUnitOutputDir(const AValue: string); virtual; abstract;
procedure SetUnitPaths(const AValue: String); virtual; abstract; procedure SetUnitPaths(const AValue: String); virtual; abstract;
procedure SetLCLWidgetType(const AValue: string); virtual;
public public
constructor Create(const TheOwner: TObject); virtual; constructor Create(const TheOwner: TObject); virtual;
destructor Destroy; override; destructor Destroy; override;