diff options
Diffstat (limited to 'src/Data/Room.cpp')
-rw-r--r-- | src/Data/Room.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Data/Room.cpp b/src/Data/Room.cpp index 95003f4..08f02f9 100644 --- a/src/Data/Room.cpp +++ b/src/Data/Room.cpp @@ -23,7 +23,7 @@ namespace ZoomEdit { namespace Data { Room::Room(xmlpp::Element *node) : roomNode(node) { - xmlpp::Node::NodeList triangleList = roomNode->get_children("triangle"); + xmlpp::Node::NodeList triangleList = node->get_children("triangle"); for(xmlpp::Node::NodeList::iterator t = triangleList.begin(); t != triangleList.end(); ++t) { xmlpp::Element *tNode = dynamic_cast<xmlpp::Element*>(*t); @@ -31,6 +31,8 @@ Room::Room(xmlpp::Element *node) : roomNode(node) { if(tNode) triangles.push_front(Triangle(tNode)); } + + id = node->get_attribute_value("id"); } } |