ide: correct wrong modified state

git-svn-id: trunk@16923 -
This commit is contained in:
paul 2008-10-07 22:20:01 +00:00
parent c35a24043c
commit 8bf594dfcf
2 changed files with 11 additions and 16 deletions

View File

@ -606,7 +606,6 @@ type
FUnitList: TFPList; // list of _all_ units (TUnitInfo)
FUpdateLock: integer;
FUseAppBundle: Boolean;
FInModified: Boolean;
FResources: TProjectResources;
function GetFirstAutoRevertLockedUnit: TUnitInfo;
function GetFirstLoadedUnit: TUnitInfo;
@ -1857,7 +1856,6 @@ constructor TProject.Create(ProjectDescription: TProjectDescriptor);
begin
inherited Create(ProjectDescription);
FInModified := False;
fActiveEditorIndexAtStart := -1;
FAutoCreateForms := true;
FBookmarks := TProjectBookmarkList.Create;
@ -2860,20 +2858,15 @@ end;
procedure TProject.SetModified(const AValue: boolean);
begin
// prevent change of modified during this chain
if FInModified then
Exit;
FInModified := True;
if AValue = Modified then exit;
inherited SetModified(AValue);
if not Modified then
begin
PublishOptions.Modified := False;
CompilerOptions.Modified := False;
Resources.Modified := False;
SessionModified := False;
Resources.Modified := False
end;
FInModified := False;
end;
procedure TProject.SetSessionModified(const AValue: boolean);

View File

@ -75,17 +75,19 @@ begin
if FInModified then
Exit;
FInModified := True;
if FModified = AValue then exit;
FModified := AValue;
if not FModified then
if FModified <> AValue then
begin
VersionInfo.Modified := False;
XPManifest.Modified := False;
ProjectIcon.Modified := False;
FModified := AValue;
if not FModified then
begin
VersionInfo.Modified := False;
XPManifest.Modified := False;
ProjectIcon.Modified := False;
end;
if Assigned(FOnModified) then
OnModified(Self);
end;
FInModified := False;
if Assigned(FOnModified) then
OnModified(Self);
end;
function TProjectResources.Update(TargetOS: String): Boolean;