Changeset 57 for trunk/IDE/UProject.pas
- Timestamp:
- Jul 16, 2012, 4:11:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/UProject.pas
r54 r57 73 73 TProject = class 74 74 private 75 FActive: Boolean;76 75 FModified: Boolean; 77 76 FOnChange: TNotifyEvent; … … 239 238 var 240 239 I: Integer; 241 begin 240 ParentDir: string; 241 begin 242 ParentDir := ExtractFileDir(Parent.FileName); 243 if Copy(FileName, 1, Length(ParentDir)) = ParentDir then 244 System.Delete(FileName, 1, Length(ParentDir) + 1); 242 245 I := 0; 243 246 while (I < Count) and (TProjectFile(Items[I]).FileName <> FileName) do Inc(I); … … 309 312 procedure TProjectFile.Save; 310 313 begin 311 if Modified then 312 Source.SaveToFile(FileName); 314 Source.SaveToFile(AbsoluteFileName); 313 315 end; 314 316 … … 319 321 if FModified = AValue then Exit; 320 322 FModified := AValue; 323 if Assigned(FOnChange) then FOnChange(Self); 321 324 end; 322 325 … … 364 367 begin 365 368 Doc := TXMLDocument.Create; 369 Self.FileName := FileName; 366 370 with Doc do try 367 371 RootNode := CreateElement('Project'); … … 395 399 396 400 procedure TProject.Save; 401 var 402 I: Integer; 397 403 begin 398 404 Files.Save; 399 405 Packages.Save; 406 for I := 0 to Files.Count - 1 do 407 TProjectFile(Files[I]).Modified := False; 408 Modified := False; 400 409 end; 401 410
Note:
See TracChangeset
for help on using the changeset viewer.