mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 10:18:03 +02:00
IDE: Respect the Use Comments setting also when editing defines.
git-svn-id: trunk@43028 -
This commit is contained in:
parent
f87570c216
commit
1b27f92d2b
@ -54,6 +54,7 @@ type
|
||||
FOptionsReader: TCompilerOptReader;
|
||||
FOptionsThread: TCompilerOptThread;
|
||||
FCustomOptions: TStrings;
|
||||
FUseComments: Boolean;
|
||||
procedure SetIdleConnected(AValue: Boolean);
|
||||
procedure OnIdle(Sender: TObject; var Done: Boolean);
|
||||
procedure DeleteSelected;
|
||||
@ -66,6 +67,7 @@ type
|
||||
property OptionsReader: TCompilerOptReader read FOptionsReader write FOptionsReader;
|
||||
property OptionsThread: TCompilerOptThread read FOptionsThread write FOptionsThread;
|
||||
property CustomOptions: TStrings read FCustomOptions write FCustomOptions;
|
||||
property UseComments: Boolean read FUseComments write FUseComments;
|
||||
end;
|
||||
|
||||
|
||||
@ -209,7 +211,7 @@ begin
|
||||
if DefinesCheckList.Checked[i] then
|
||||
FOptionsReader.Defines.Add('-d' + DefinesCheckList.Items[i]);
|
||||
// Then add all options and defines.
|
||||
FOptionsReader.ToCustomOptions(aStrings, False);
|
||||
FOptionsReader.ToCustomOptions(aStrings, FUseComments);
|
||||
Result:=mrOk;
|
||||
end;
|
||||
|
||||
|
@ -31,9 +31,9 @@ uses
|
||||
Classes, SysUtils, math, AVL_Tree, LazLogger, Forms, Controls, Graphics,
|
||||
Dialogs, StdCtrls, LCLProc, ComCtrls, LCLType, ExtCtrls, Buttons,
|
||||
CodeToolsCfgScript, KeywordFuncLists, LazarusIDEStrConsts,
|
||||
IDEOptionsIntf, CompOptsIntf, IDECommands, Project,
|
||||
CompilerOptions, AllCompilerOptions, Compiler, EditorOptions, PackageDefs,
|
||||
SynEdit, SynEditKeyCmds, SynCompletion, SourceSynEditor, CustomDefines;
|
||||
IDEOptionsIntf, CompOptsIntf, IDECommands, Project, PackageDefs,
|
||||
CompilerOptions, Compiler, AllCompilerOptions, CustomDefines,
|
||||
EditorOptions, SynEdit, SynEditKeyCmds, SynCompletion, SourceSynEditor;
|
||||
|
||||
type
|
||||
|
||||
@ -150,6 +150,7 @@ begin
|
||||
EditForm.OptionsThread := FOptionsThread;
|
||||
EditForm.CustomOptions := memoCustomOptions.Lines;
|
||||
EditForm.DefinesCheckList.Items.Assign(Project1.CustomDefines);
|
||||
EditForm.UseComments := FUseComments;
|
||||
if EditForm.ShowModal = mrOK then
|
||||
begin
|
||||
Project1.CustomDefines.Assign(EditForm.DefinesCheckList.Items);
|
||||
|
Loading…
Reference in New Issue
Block a user