IDE: fixed switching build mode in options dialog, bug #31787

git-svn-id: trunk@54855 -
This commit is contained in:
mattias 2017-05-10 15:20:37 +00:00
parent 7b4283dd0e
commit 379ed5300f
3 changed files with 11 additions and 3 deletions

View File

@ -33,8 +33,9 @@ uses
Classes, SysUtils,
Forms, Controls, Dialogs, StdCtrls, Grids, Menus, ComCtrls, ButtonPanel, LCLProc,
IDEOptionsIntf, IDEDialogs,
TransferMacros, Project, CompilerOptions, Compiler_ModeMatrix, BuildModeDiffDlg,
EnvironmentOpts, LazarusIDEStrConsts;
TransferMacros, Project, CompilerOptions,
EnvironmentOpts, LazarusIDEStrConsts,
BaseBuildManager, Compiler_ModeMatrix, BuildModeDiffDlg;
type
@ -145,6 +146,8 @@ procedure SwitchBuildMode(aBuildModeID: string);
begin
OnSaveIDEOptionsHook(Nil, Project1.CompilerOptions); // Save changes
Project1.ActiveBuildModeID := aBuildModeID; // Switch
IncreaseBuildMacroChangeStamp;
BuildBoss.SetBuildTargetProject1;
OnLoadIDEOptionsHook(Nil, Project1.CompilerOptions); // Load options
end;

View File

@ -198,6 +198,7 @@ begin
if not IDEMacros.SubstituteMacros(AValue) then
AValue := '';
end;
//debugln(['TCompilerConfigTargetFrame.UpdateWidgetSet ',AValue]);
CurrentWidgetTypeLabel.Caption := Format(lisCurrentLCLWidgetSet, [AValue]);
end;
@ -251,6 +252,7 @@ procedure TCompilerConfigTargetFrame.Setup(ADialog: TAbstractOptionsEditorDialog
var
s: ShortString;
begin
//debugln(['TCompilerConfigTargetFrame.Setup ']);
FDialog := ADialog;
// Config
grbConfigFile.Caption := dlgConfigFiles;
@ -285,7 +287,6 @@ begin
grbTargetOptions.Caption := dlgTargetSpecificOptions;
chkWin32GraphicApp.Caption := dlgWin32GUIApp + ' (-WG)';
// WidgetSet
UpdateWidgetSet;
LCLWidgetTypeLabel.Caption := lisSelectAnotherLCLWidgetSet;
end;
@ -336,6 +337,8 @@ begin
chkWin32GraphicApp.Checked := Win32GraphicApp;
chkWin32GraphicApp.Enabled := NeedsLinkerOpts;
end;
UpdateWidgetSet;
end;
procedure TCompilerConfigTargetFrame.WriteSettings(AOptions: TAbstractIDEOptions);

View File

@ -4732,6 +4732,8 @@ begin
Application.TaskBarBehavior := tbSingleButton
else
Application.TaskBarBehavior := tbDefault;
end else begin
MainBuildBoss.SetBuildTargetProject1;
end;
finally
IDEOptionsDialog.Free;