Changeset 24 for trunk/IDE/UProject.pas
- Timestamp:
- Nov 10, 2010, 9:42:27 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/UProject.pas
r23 r24 14 14 15 15 TProjectNode = class 16 private 17 FModified: Boolean; 18 procedure SetModified(const AValue: Boolean); 19 public 16 20 Parent: TProjectNode; 17 21 Name: string; 18 22 ProducedFileName: string; 19 Modified: Boolean;20 23 procedure SaveToXMLNode(Node: TDOMNode); virtual; 21 24 procedure LoadFromXMLNode(Node: TDOMNode); virtual; … … 23 26 procedure Save; virtual; 24 27 function GetDir(IncludeRoot: Boolean = False): string; virtual; 28 property Modified: Boolean read FModified write SetModified; 25 29 end; 26 30 … … 197 201 procedure TProjectFile.Save; 198 202 begin 203 if Modified then 204 Source.SaveToFile(Parent.GetDir(True) + Name); 199 205 inherited Save; 200 Source.SaveToFile(Parent.GetDir(True) + Name);201 206 end; 202 207 203 208 { TProjectNode } 209 210 procedure TProjectNode.SetModified(const AValue: Boolean); 211 begin 212 if FModified=AValue then exit; 213 FModified:=AValue; 214 if Assigned(Parent) then Parent.Modified := AValue; 215 end; 204 216 205 217 procedure TProjectNode.SaveToXMLNode(Node: TDOMNode);
Note:
See TracChangeset
for help on using the changeset viewer.