Changeset 87:495d52531f18 in finroc_plugins_parameters


Ignore:
Timestamp:
14.04.2020 16:58:26 (11 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Children:
88:6c1a97f9bad3, 89:ac4d46e44550
Phase:
public
Message:

Prevents reordering of inserted XML nodes when including config files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tConfigFile.cpp

    r85 r87  
    111111        rrlib::xml::tDocument insert = LoadConfigFile(file_name); 
    112112        auto& parent = node.Parent(); 
     113        rrlib::xml::tNode* insert_after = &node; 
    113114        for (auto it = insert.RootNode().ChildrenBegin(); it != insert.RootNode().ChildrenEnd(); ++it) 
    114115        { 
    115           node.AddNextSibling(*it, true); // not using copy resulted in erroneous behavior 
     116          insert_after = &insert_after->AddNextSibling(*it, true); // not using copy resulted in erroneous behavior 
    116117        } 
    117118        parent.RemoveChildNode(node); 
Note: See TracChangeset for help on using the changeset viewer.