[Lngcompiler-commits] CVS: lngcompiler LngForm.pas,1.10,1.11
Brought to you by:
lovetski,
maximmasiutin
From: Maxim M. <max...@us...> - 2002-07-04 11:09:13
|
Update of /cvsroot/lngcompiler/lngcompiler In directory usw-pr-cvs1:/tmp/cvs-serv17637 Modified Files: LngForm.pas Log Message: Fixed modified-flag checking. Index: LngForm.pas =================================================================== RCS file: /cvsroot/lngcompiler/lngcompiler/LngForm.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** LngForm.pas 15 Jun 2002 16:22:42 -0000 1.10 --- LngForm.pas 4 Jul 2002 11:09:10 -0000 1.11 *************** *** 878,881 **** --- 878,882 ---- IDL.Free; end; + end; *************** *** 1158,1162 **** LI := Pointer(OL.Objects[I]); LLI := Pointer(LF.Items.Objects[I]); ! if LI.Text.Count <> LLI.Text.Count then LF.Modified := True else for J := 0 to LI.Text.Count-1 do if LI.Text[J] <> LLI.Text[J] then --- 1159,1166 ---- LI := Pointer(OL.Objects[I]); LLI := Pointer(LF.Items.Objects[I]); ! if LI.Text.Count <> LLI.Text.Count then ! begin ! LF.Modified := True ! end else for J := 0 to LI.Text.Count-1 do if LI.Text[J] <> LLI.Text[J] then *************** *** 1802,1810 **** procedure TForm1.CheckLngChange; ! var I,J{,K}: Integer; ! OL: TStringList; ! //CF: TLngForm; ! LI, LLI: TLngString; ! XX: Boolean; begin OL := nil; --- 1806,1816 ---- procedure TForm1.CheckLngChange; ! var ! I,J{,K}: Integer; ! OL: TStringList; ! CF: TLngForm; ! LF: TLngFile; ! LI, LLI: TLngString; ! XX: Boolean; begin OL := nil; *************** *** 1814,1825 **** XX := True; for I := 0 to CurLng.Count-1 do ! with TLngForm(CurLng[I]) do ! if (Name = '') and (Strings <> nil) then begin if XX then begin XX := False; ! OL.Assign(Strings); ! Strings.Clear; for J := 1 to gStrings.RowCount-1 do begin --- 1820,1832 ---- XX := True; for I := 0 to CurLng.Count-1 do ! begin ! CF := CurLng[I]; ! if (CF.Name = '') and (CF.Strings <> nil) then begin if XX then begin XX := False; ! OL.Assign(CF.Strings); ! CF.Strings.Clear; for J := 1 to gStrings.RowCount-1 do begin *************** *** 1827,1853 **** LI.Name := gStrings.Rows[J][0]; LI.S := gStrings.Rows[J][2]; ! Strings.AddObject(AnsiUpperCase(LI.Name), LI); end; ! if OL.Count <> Strings.Count ! then Modified := True else begin for J := 0 to OL.Count-1 do ! if OL[J] = Strings[J] then begin LI := Pointer(OL.Objects[J]); ! LLI := Pointer(Strings.Objects[J]); if LI.S <> LLI.S then begin ! Modified := True; Break; end; end else begin ! Modified := True; Break; end; end; ! end else FreeList(Strings); end; finally FreeList(OL); --- 1834,1864 ---- LI.Name := gStrings.Rows[J][0]; LI.S := gStrings.Rows[J][2]; ! CF.Strings.AddObject(AnsiUpperCase(LI.Name), LI); end; ! if OL.Count <> CF.Strings.Count ! then ! begin ! CF.Modified := True ! end else begin for J := 0 to OL.Count-1 do ! if OL[J] = CF.Strings[J] then begin LI := Pointer(OL.Objects[J]); ! LLI := Pointer(CF.Strings.Objects[J]); if LI.S <> LLI.S then begin ! CF.Modified := True; Break; end; end else begin ! CF.Modified := True; Break; end; end; ! end else FreeList(CF.Strings); end; + end; finally FreeList(OL); *************** *** 2143,2147 **** procedure TForm1.Savechanges1Click(Sender: TObject); begin ! SaveChanges(); end; --- 2154,2158 ---- procedure TForm1.Savechanges1Click(Sender: TObject); begin ! SaveChanges; end; |