+//------------------------------------------------------------------------------
+std::string vvReadState::ReadLink()
+{
+ std::string id_from, id_to, value;
+
+ QXmlStreamAttributes attributes = m_XmlReader->attributes();
+ if (!m_XmlReader->hasError()) {
+ id_from = attributes.value("Id").toString().toStdString();
+ }
+
+ while (!m_XmlReader->isEndElement() || value != "LinkedFrom") {
+ m_XmlReader->readNext();
+ value = m_XmlReader->qualifiedName().toString().toStdString();
+ if (m_XmlReader->isStartElement()) {
+ if (value == "LinkedTo") {
+ id_to = m_XmlReader->readElementText().toStdString();
+ if (!m_XmlReader->hasError()) {
+ m_Window->AddLink(id_from.c_str(), id_to.c_str(), false);
+ }
+ }
+ }
+ }
+
+ return value;
+}
+//------------------------------------------------------------------------------
+