mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 20:40:40 +02:00
IDE: added checks for cleaning up codetools defines for packages and projects
git-svn-id: trunk@10285 -
This commit is contained in:
parent
c08c61fe53
commit
a6a3f56624
@ -4250,7 +4250,7 @@ end;
|
||||
procedure TProjectDefineTemplates.Clear;
|
||||
begin
|
||||
if FMain<>nil then begin
|
||||
if CodeToolBoss<>nil then
|
||||
if (CodeToolBoss<>nil) and (FMain<>nil) then
|
||||
CodeToolBoss.DefineTree.RemoveDefineTemplate(FMain);
|
||||
FMain:=nil;
|
||||
FSrcDirIfDef:=nil;
|
||||
@ -4258,6 +4258,12 @@ begin
|
||||
FOutPutSrcPath:=nil;
|
||||
FOutputDir:=nil;
|
||||
FFlags:=FFlags+[ptfFlagsChanged];
|
||||
fLastOutputDirSrcPathIDAsString:='';
|
||||
FLastCustomOptions:='';
|
||||
if fLastSourceDirectories<>nil then
|
||||
fLastSourceDirectories.Clear;
|
||||
fLastSourceDirsIDAsString:='';
|
||||
fLastUnitPath:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -3636,14 +3636,18 @@ end;
|
||||
procedure TLazPackageDefineTemplates.Clear;
|
||||
begin
|
||||
if FMain<>nil then begin
|
||||
fLastSourceDirectories.Clear;
|
||||
CodeToolBoss.DefineTree.RemoveDefineTemplate(FMain);
|
||||
if (CodeToolBoss<>nil) and (FMain<>nil) then
|
||||
CodeToolBoss.DefineTree.RemoveDefineTemplate(FMain);
|
||||
FMain:=nil;
|
||||
FOutputDir:=nil;
|
||||
FOutPutSrcPath:=nil;
|
||||
FSrcDirectories:=nil;
|
||||
fLastOutputDirSrcPathIDAsString:='';
|
||||
FLastCustomOptions:='';
|
||||
fLastUnitPath:='';
|
||||
fLastSourceDirsIDAsString:='';
|
||||
if fLastSourceDirectories<>nil then
|
||||
fLastSourceDirectories.Clear;
|
||||
FFlags:=FFlags+[pdtIDChanged,pdtOutputDirChanged,pdtSourceDirsChanged,
|
||||
pdtCustomDefinesChanged];
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user