Better implementation of SessionSnapshots saving

This commit is contained in:
Bruno
2021-04-18 18:22:21 +02:00
parent d68987be0f
commit a50a6e129c
8 changed files with 67 additions and 93 deletions

View File

@@ -76,12 +76,9 @@ bool SessionVisitor::saveSession(const std::string& filename, Session *session)
// 3. snapshots
XMLElement *snapshots = xmlDoc.NewElement("Snapshots");
// const XMLElement* N = Action::manager().snapshotsRoot();
// for( ; N ; N=N->NextSiblingElement())
// snapshots->InsertEndChild( N->DeepClone( &xmlDoc ));
XMLText *desc = xmlDoc.NewText( Action::manager().snapshotsDescription() );
snapshots->InsertEndChild( desc );
const XMLElement* N = session->snapshots()->xmlDoc_->FirstChildElement();
for( ; N ; N=N->NextSiblingElement())
snapshots->InsertEndChild( N->DeepClone( &xmlDoc ));
xmlDoc.InsertEndChild(snapshots);
// 4. optional notes