Changeset 113 for trunk/UAcronym.pas


Ignore:
Timestamp:
Nov 1, 2016, 12:58:12 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Loading of import source refs for acronyms from file was not working due wrong execution sequence.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UAcronym.pas

    r111 r113  
    14401440        Categories.LoadFromNode(NewNode);
    14411441
    1442       // Load acronyms after categories because of references
     1442      NewNode := FindNode('ImportFormats');
     1443      if Assigned(NewNode) then
     1444        ImportFormats.LoadFromNode(NewNode);
     1445
     1446      NewNode := FindNode('ImportSources');
     1447      if Assigned(NewNode) then
     1448        ImportSources.LoadFromNode(NewNode);
     1449
     1450      // Load acronyms after categories and import formats and sources because of references
    14431451      NewNode := FindNode('Acronyms');
    14441452      if Assigned(NewNode) then
    14451453        Acronyms.LoadFromNode(NewNode);
    1446 
    1447       NewNode := FindNode('ImportFormats');
    1448       if Assigned(NewNode) then
    1449         ImportFormats.LoadFromNode(NewNode);
    1450 
    1451       NewNode := FindNode('ImportSources');
    1452       if Assigned(NewNode) then
    1453         ImportSources.LoadFromNode(NewNode);
    14541454    end;
    14551455  finally
     
    14781478      Categories.SaveToNode(NewNode);
    14791479
    1480       // Save acronyms after categories because of references
     1480      NewNode := OwnerDocument.CreateElement('ImportFormats');
     1481      AppendChild(NewNode);
     1482      ImportFormats.SaveToNode(NewNode);
     1483
     1484      NewNode := OwnerDocument.CreateElement('ImportSources');
     1485      AppendChild(NewNode);
     1486      ImportSources.SaveToNode(NewNode);
     1487
     1488      // Save acronyms after categories, import formats and sources because of references
    14811489      NewNode := OwnerDocument.CreateElement('Acronyms');
    14821490      AppendChild(NewNode);
    14831491      Acronyms.SaveToNode(NewNode);
    1484 
    1485       NewNode := OwnerDocument.CreateElement('ImportFormats');
    1486       AppendChild(NewNode);
    1487       ImportFormats.SaveToNode(NewNode);
    1488 
    1489       NewNode := OwnerDocument.CreateElement('ImportSources');
    1490       AppendChild(NewNode);
    1491       ImportSources.SaveToNode(NewNode);
    14921492    end;
    14931493    ForceDirectories(ExtractFileDir(FileName));
Note: See TracChangeset for help on using the changeset viewer.