mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Fixed Session load recursion, allow higher level of imbrication
Recursive load of SessionFile in a Session is now detected by filename and prevented. Deeper level of integration of sessionfile inside session is thus possible (set to 3). Sessions now have an id, allowing to reference them by id in the logs. Terminology is clarified between level and recursion.
This commit is contained in:
@@ -75,6 +75,7 @@ bool SessionVisitor::saveSession(const std::string& filename, Session *session)
|
||||
(*iter)->accept(sv);
|
||||
|
||||
// save session attributes
|
||||
sessionNode->SetAttribute("id", session->id());
|
||||
sessionNode->SetAttribute("activationThreshold", session->activationThreshold());
|
||||
|
||||
// save the thumbnail
|
||||
@@ -664,6 +665,7 @@ void SessionVisitor::visit (SessionGroupSource& s)
|
||||
Session *se = s.session();
|
||||
if (se) {
|
||||
XMLElement *sessionNode = xmlDoc_->NewElement("Session");
|
||||
sessionNode->SetAttribute("id", se->id());
|
||||
xmlCurrent_->InsertEndChild(sessionNode);
|
||||
|
||||
for (auto iter = se->begin(); iter != se->end(); ++iter){
|
||||
|
||||
Reference in New Issue
Block a user