From 4b7b10696b3aa81c6c55715b4805e6823302536d Mon Sep 17 00:00:00 2001 From: ondrej Date: Fri, 8 Jan 2016 12:36:01 +0000 Subject: [PATCH] ide: fix Options changed through "Change Build Mode" CoolBar button isn't respected by the compiler. Issue #28059 git-svn-id: trunk@51229 - --- ide/main.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ide/main.pp b/ide/main.pp index 28060ef64e..66a55f21c1 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -4039,11 +4039,13 @@ begin Project1.CompilerOptions.OtherDefines.Assign(Project1.OtherDefines); Capt := Format(dlgProjectOptionsFor, [Project1.GetTitleOrName]); - if DoOpenIDEOptions(nil, Capt, AFilter, []) - and not Project1.OtherDefines.Equals(Project1.CompilerOptions.OtherDefines) then + if DoOpenIDEOptions(nil, Capt, AFilter, []) then begin - Project1.OtherDefines.Assign(Project1.CompilerOptions.OtherDefines); + if not Project1.OtherDefines.Equals(Project1.CompilerOptions.OtherDefines) then + Project1.OtherDefines.Assign(Project1.CompilerOptions.OtherDefines); Project1.Modified:=True; + MainBuildBoss.SetBuildTargetProject1(false); + MainIDE.UpdateCaption; end; end; @@ -4924,7 +4926,6 @@ begin UpdateCaption; AProject.DefineTemplates.AllChanged; IncreaseCompilerParseStamp; - MainBuildBoss.SetBuildTargetProject1(false); if AProject.UseAsDefault then begin