diff options
-rw-r--r-- | src/nodetree.cc | 7 | ||||
-rw-r--r-- | src/xmlparser.cc | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/nodetree.cc b/src/nodetree.cc index 2043c90..38c20e1 100644 --- a/src/nodetree.cc +++ b/src/nodetree.cc @@ -53,8 +53,11 @@ std::string Node::toXML(std::string prefix) std::map<std::string, std::string>::iterator ai = data.attributes.begin(); while(ai != data.attributes.end()) { - xml += prefix + " <attribute name=\"" + xml_encode(ai->first) + "\">" - + xml_encode(ai->second) + "</attribute>\n"; + if(ai->first != "dragged") // Do not persist 'dragged' attribute + { + xml += prefix + " <attribute name=\"" + xml_encode(ai->first) + "\">" + + xml_encode(ai->second) + "</attribute>\n"; + } ai++; } xml += prefix + " </attributes>\n"; diff --git a/src/xmlparser.cc b/src/xmlparser.cc index e410f88..47e217c 100644 --- a/src/xmlparser.cc +++ b/src/xmlparser.cc @@ -91,6 +91,9 @@ void XmlParser::endTag(std::string name) if(name == "attribute") { - node->data.attributes[attr_name] = cdata; + if(attr_name != "dragged") // do not persist 'dragged' attribute + { + node->data.attributes[attr_name] = cdata; + } } } |