summaryrefslogtreecommitdiffstats
path: root/src/Data
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data')
-rw-r--r--src/Data/Triangle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Data/Triangle.cpp b/src/Data/Triangle.cpp
index d334c12..a85d8ad 100644
--- a/src/Data/Triangle.cpp
+++ b/src/Data/Triangle.cpp
@@ -18,6 +18,7 @@
*/
#include "Triangle.h"
+#include "../Util/Xml.h"
#include <cstdlib>
namespace ZoomEdit {
@@ -121,7 +122,7 @@ void Triangle::setNormal(unsigned int i, const Vector &n) {
normals[i] = n;
if(!normalNodes[i])
- normalNodes[i] = triangleNode->add_child(static_cast<xmlpp::Node*>(vertexNodes[i]), "normal");
+ normalNodes[i] = Util::Xml::addSibling(static_cast<xmlpp::Node*>(vertexNodes[i]), "normal");
normalNodes[i]->set_attribute("x", Glib::ustring::format(n.getX()));
normalNodes[i]->set_attribute("y", Glib::ustring::format(n.getY()));
@@ -133,9 +134,9 @@ void Triangle::setTexCoords(unsigned int i, const TexCoords &t) {
if(!texCoordsNodes[i]) {
if(normalNodes[i])
- texCoordsNodes[i] = triangleNode->add_child(static_cast<xmlpp::Node*>(normalNodes[i]), "texcoords");
+ texCoordsNodes[i] = Util::Xml::addSibling(static_cast<xmlpp::Node*>(normalNodes[i]), "texcoords");
else
- texCoordsNodes[i] = triangleNode->add_child(static_cast<xmlpp::Node*>(vertexNodes[i]), "texcoords");
+ texCoordsNodes[i] = Util::Xml::addSibling(static_cast<xmlpp::Node*>(vertexNodes[i]), "texcoords");
}
texCoordsNodes[i]->set_attribute("s", Glib::ustring::format(t.getS()));