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

View File

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

View File

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