1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include <Model_Session.h>
21 #include <ModelAPI_Feature.h>
22 #include <ModelAPI_Plugin.h>
23 #include <Model_Data.h>
24 #include <Model_Document.h>
25 #include <Model_Objects.h>
26 #include <Model_Application.h>
27 #include <Model_Events.h>
28 #include <Model_Validator.h>
29 #include <Model_FiltersFactory.h>
30 #include <ModelAPI_Events.h>
31 #include <Events_Loop.h>
32 #include <Events_InfoMessage.h>
33 #include <Config_FeatureMessage.h>
34 #include <Config_AttributeMessage.h>
35 #include <Config_ValidatorMessage.h>
36 #include <Config_ModuleReader.h>
37 #include <Config_ValidatorReader.h>
38 #include <Config_PluginMessage.h>
40 #include <ModelAPI_CompositeFeature.h>
41 #include <ModelAPI_ResultPart.h>
42 #include <ModelAPI_Tools.h>
44 #include <TDF_ChildIDIterator.hxx>
45 #include <TDF_CopyTool.hxx>
46 #include <TDF_DataSet.hxx>
47 #include <TDF_RelocationTable.hxx>
48 #include <TDF_ClosureTool.hxx>
50 #include <TNaming_Builder.hxx>
51 #include <TNaming_Iterator.hxx>
52 #include <TNaming_NamedShape.hxx>
54 #include <TopoDS_Shape.hxx>
56 static Model_Session* myImpl = new Model_Session();
58 // to redirect all calls to the root document
59 #define ROOT_DOC std::dynamic_pointer_cast<Model_Document>(moduleDocument())
61 bool Model_Session::load(const char* theFileName)
63 bool aRes = ROOT_DOC->load(theFileName, "root", ROOT_DOC);
67 bool Model_Session::save(const char* theFileName, std::list<std::string>& theResults)
69 return ROOT_DOC->save(theFileName, "root", theResults);
72 void Model_Session::closeAll()
74 Model_Application::getApplication()->deleteAllDocuments();
75 static const Events_ID aDocChangeEvent = Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED);
76 static std::shared_ptr<Events_Message> aMsg(new Events_Message(aDocChangeEvent));
77 Events_Loop::loop()->send(aMsg);
78 Events_Loop::loop()->flush(aDocChangeEvent);
81 void Model_Session::startOperation(const std::string& theId, const bool theAttachedToNested)
83 myOperationAttachedToNext.push_back(theAttachedToNested);
84 ROOT_DOC->startOperation();
85 ROOT_DOC->operationId(theId);
86 static std::shared_ptr<Events_Message> aStartedMsg
87 (new Events_Message(Events_Loop::eventByName("StartOperation")));
88 Events_Loop::loop()->send(aStartedMsg);
89 // remove all useless documents that has been closed: on start of operation undo/redo is cleared
90 // MPV: this code is dangerous now because it may close the document that is activated right now
91 // but not in the list of the opened documents yet (create, delete, undo, activate Part)
92 // later this must be updated by correct usage of uniques IDs of documents, not names of results
93 //std::list<std::shared_ptr<ModelAPI_Document> > aUsedDocs = allOpenedDocuments();
94 //Model_Application::getApplication()->removeUselessDocuments(aUsedDocs);
97 void Model_Session::finishOperation()
99 setCheckTransactions(false);
100 ROOT_DOC->finishOperation();
101 while(myOperationAttachedToNext.back()) { // with nested, the first transaction can not be attached
102 ROOT_DOC->finishOperation();
103 myOperationAttachedToNext.pop_back();
105 myOperationAttachedToNext.pop_back();
106 setCheckTransactions(true);
109 void Model_Session::abortOperation()
111 setCheckTransactions(false);
112 ROOT_DOC->abortOperation();
113 while(myOperationAttachedToNext.back()) { // with nested, the first transaction can not be attached
114 ROOT_DOC->abortOperation();
115 myOperationAttachedToNext.pop_back();
117 myOperationAttachedToNext.pop_back();
118 setCheckTransactions(true);
119 // here the update mechanism may work after abort, so, suppress the warnings about
120 // modifications outside of the transactions
121 bool aWasCheck = myCheckTransactions;
122 myCheckTransactions = false;
123 static std::shared_ptr<Events_Message> anAbortMsg
124 (new Events_Message(Events_Loop::eventByName("AbortOperation")));
125 Events_Loop::loop()->send(anAbortMsg);
126 myCheckTransactions = true;
127 myCheckTransactions = aWasCheck;
130 bool Model_Session::isOperation()
132 return ROOT_DOC->isOperation();
135 bool Model_Session::isModified()
137 return ROOT_DOC->isModified();
140 bool Model_Session::canUndo()
142 return ROOT_DOC->canUndo();
145 void Model_Session::undo()
147 setCheckTransactions(false);
149 setCheckTransactions(true);
152 bool Model_Session::canRedo()
154 return ROOT_DOC->canRedo();
157 void Model_Session::redo()
159 setCheckTransactions(false);
161 setCheckTransactions(true);
164 //! Returns stack of performed operations
165 std::list<std::string> Model_Session::undoList()
167 return ROOT_DOC->undoList();
169 //! Returns stack of rolled back operations
170 std::list<std::string> Model_Session::redoList()
172 return ROOT_DOC->redoList();
175 ModelAPI_Plugin* Model_Session::getPlugin(const std::string& thePluginName)
177 if (myPluginObjs.find(thePluginName) == myPluginObjs.end()) {
178 // before load the used plugins
179 if (myUsePlugins.find(thePluginName) != myUsePlugins.end()) {
180 std::string aUse = myUsePlugins[thePluginName];
181 std::stringstream aUseStream(aUse);
182 std::string aPluginName;
183 while (std::getline(aUseStream, aPluginName, ',')) {
184 if (myPluginObjs.find(aPluginName) == myPluginObjs.end())
185 getPlugin(aPluginName);
188 // load plugin library if not yet done
189 Config_ModuleReader::loadPlugin(thePluginName);
191 if (myPluginObjs.find(thePluginName) == myPluginObjs.end()) {
192 Events_InfoMessage("Model_Session", "Can not load plugin '%1'").arg(thePluginName).send();
195 return myPluginObjs[thePluginName];
198 FeaturePtr Model_Session::createFeature(std::string theFeatureID, Model_Document* theDocOwner)
200 if (this != myImpl) {
201 return myImpl->createFeature(theFeatureID, theDocOwner);
204 // load all information about plugins, features and attributes
207 if (myPlugins.find(theFeatureID) != myPlugins.end()) {
208 std::pair<std::string, std::string>& aPlugin = myPlugins[theFeatureID]; // plugin and doc kind
209 if (!aPlugin.second.empty() && aPlugin.second != theDocOwner->kind()) {
210 Events_InfoMessage("Model_Session",
211 "Feature '%1' can be created only in document '%2' by the XML definition")
212 .arg(theFeatureID).arg(aPlugin.second).send();
215 ModelAPI_Plugin* aPluginObj = getPlugin(aPlugin.first);
217 FeaturePtr aCreated = aPluginObj->createFeature(theFeatureID);
219 Events_InfoMessage("Model_Session", "Can not initialize feature '%1' in plugin '%2'")
220 .arg(theFeatureID).arg(aPlugin.first).send();
224 Events_InfoMessage("Model_Session", "Can not load plugin '%1'").arg(aPlugin.first).send();
227 Events_InfoMessage("Model_Session",
228 "Feature '%1' not found in any plugin").arg(theFeatureID).send();
231 return FeaturePtr(); // return nothing
234 std::shared_ptr<ModelAPI_Document> Model_Session::moduleDocument()
236 Handle(Model_Application) anApp = Model_Application::getApplication();
237 bool aFirstCall = !anApp->hasRoot();
239 // to be sure that plugins are loaded,
240 // even before the first "createFeature" call (in unit tests)
243 // creation of the root document is always outside of the transaction, so, avoid checking it
244 setCheckTransactions(false);
245 anApp->createDocument(0); // 0 is a root ID
246 // creation of the root document is always outside of the transaction, so, avoid checking it
247 setCheckTransactions(true);
249 return anApp->rootDocument();
252 std::shared_ptr<ModelAPI_Document> Model_Session::document(int theDocID)
254 return std::shared_ptr<ModelAPI_Document>(
255 Model_Application::getApplication()->document(theDocID));
258 bool Model_Session::hasModuleDocument()
260 return Model_Application::getApplication()->hasRoot();
263 std::shared_ptr<ModelAPI_Document> Model_Session::activeDocument()
265 if (!myCurrentDoc || !Model_Application::getApplication()->hasDocument(myCurrentDoc->id()))
266 myCurrentDoc = moduleDocument();
270 /// makes the last feature in the document as the current
271 static void makeCurrentLast(std::shared_ptr<ModelAPI_Document> theDoc) {
273 FeaturePtr aLast = std::dynamic_pointer_cast<Model_Document>(theDoc)->lastFeature();
274 // if last is nested into something else, make this something else as last:
275 // otherwise it will look like edition of sub-element, so, the main will be disabled
277 CompositeFeaturePtr aMain = ModelAPI_Tools::compositeOwner(aLast);
280 aMain = ModelAPI_Tools::compositeOwner(aLast);
283 theDoc->setCurrentFeature(aLast, false);
287 void Model_Session::setActiveDocument(
288 std::shared_ptr<ModelAPI_Document> theDoc, bool theSendSignal)
290 if (myCurrentDoc != theDoc) {
291 if (myCurrentDoc.get())
292 myCurrentDoc->setActive(false);
294 theDoc->setActive(true);
296 std::shared_ptr<ModelAPI_Document> aPrevious = myCurrentDoc;
297 myCurrentDoc = theDoc;
298 if (theDoc.get() && theSendSignal) {
299 // this must be before the synchronization call because features in PartSet lower than this
300 // part feature must be disabled and don't recomputed anymore (issue 1156,
301 // translation feature is failed on activation of Part 2)
302 if (isOperation()) { // do it only in transaction, not on opening of document
303 DocumentPtr aRoot = moduleDocument();
304 if (myCurrentDoc != aRoot) {
305 FeaturePtr aPartFeat = ModelAPI_Tools::findPartFeature(aRoot, myCurrentDoc);
306 if (aPartFeat.get()) {
307 aRoot->setCurrentFeature(aPartFeat, false);
311 // synchronize the document: it may be just opened or opened but removed before
312 std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(theDoc);
314 bool aWasChecked = myCheckTransactions;
315 setCheckTransactions(false);
316 TDF_LabelList anEmptyUpdated;
317 aDoc->objects()->synchronizeFeatures(anEmptyUpdated, true, true, false, true);
319 setCheckTransactions(true);
321 static std::shared_ptr<Events_Message> aMsg(
322 new Events_Message(Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED)));
323 Events_Loop::loop()->send(aMsg);
325 // make the current state correct and synchronized in the module and sub-documents
326 if (isOperation()) { // do it only in transaction, not on opening of document
327 if (myCurrentDoc == moduleDocument()) {
328 // make the current feature the latest in root, in previous root current become also last
329 makeCurrentLast(aPrevious);
330 makeCurrentLast(myCurrentDoc);
332 // make the current feature the latest in sub, root current feature becomes this sub
333 makeCurrentLast(myCurrentDoc);
339 std::list<std::shared_ptr<ModelAPI_Document> > Model_Session::allOpenedDocuments()
341 std::list<std::shared_ptr<ModelAPI_Document> > aResult;
342 aResult.push_back(moduleDocument());
343 // add subs recursively
344 std::list<std::shared_ptr<ModelAPI_Document> >::iterator aDoc = aResult.begin();
345 for(; aDoc != aResult.end(); aDoc++) {
346 DocumentPtr anAPIDoc = *aDoc;
347 std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(anAPIDoc);
349 const std::set<int> aSubs = aDoc->subDocuments();
350 std::set<int>::const_iterator aSubIter = aSubs.cbegin();
351 for(; aSubIter != aSubs.cend(); aSubIter++) {
352 aResult.push_back(Model_Application::getApplication()->document(*aSubIter));
359 bool Model_Session::isLoadByDemand(const std::string theDocID, const int theDocIndex)
361 return Model_Application::getApplication()->isLoadByDemand(theDocID, theDocIndex);
364 std::shared_ptr<ModelAPI_Document> Model_Session::copy(
365 std::shared_ptr<ModelAPI_Document> theSource, const int theDestID)
367 std::shared_ptr<Model_Document> aNew = Model_Application::getApplication()->document(theDestID);
368 // make a copy of all labels
369 TDF_Label aSourceRoot = std::dynamic_pointer_cast<Model_Document>(theSource)->document()->Main()
371 TDF_Label aTargetRoot = aNew->document()->Main().Father();
372 Handle(TDF_DataSet) aDS = new TDF_DataSet;
373 aDS->AddLabel(aSourceRoot);
374 TDF_ClosureTool::Closure(aDS);
375 Handle(TDF_RelocationTable) aRT = new TDF_RelocationTable(Standard_True);
376 aRT->SetRelocation(aSourceRoot, aTargetRoot);
377 TDF_CopyTool::Copy(aDS, aRT);
379 // TODO: remove after fix in OCCT.
380 // All named shapes are stored in reversed order, so to fix this we reverse them back.
381 for(TDF_ChildIDIterator aChildIter(aTargetRoot, TNaming_NamedShape::GetID(), true);
384 Handle(TNaming_NamedShape) aNamedShape =
385 Handle(TNaming_NamedShape)::DownCast(aChildIter.Value());
386 if (aNamedShape.IsNull()) {
390 TopoDS_Shape aShape = aNamedShape->Get();
391 if(aShape.IsNull() || aShape.ShapeType() != TopAbs_COMPOUND) {
395 TNaming_Evolution anEvol = aNamedShape->Evolution();
396 std::list<std::pair<TopoDS_Shape, TopoDS_Shape> > aShapePairs; // to store old and new shapes
397 for(TNaming_Iterator anIter(aNamedShape); anIter.More(); anIter.Next()) {
398 aShapePairs.push_back(
399 std::pair<TopoDS_Shape, TopoDS_Shape>(anIter.OldShape(), anIter.NewShape()));
402 // Add in reverse order.
403 TDF_Label aLabel = aNamedShape->Label();
404 TNaming_Builder aBuilder(aLabel);
405 for(std::list<std::pair<TopoDS_Shape, TopoDS_Shape> >::iterator aPairsIter =
407 aPairsIter != aShapePairs.end();
409 if (anEvol == TNaming_GENERATED) {
410 aBuilder.Generated(aPairsIter->first, aPairsIter->second);
411 } else if (anEvol == TNaming_MODIFY) {
412 aBuilder.Modify(aPairsIter->first, aPairsIter->second);
413 } else if (anEvol == TNaming_DELETE) {
414 aBuilder.Delete(aPairsIter->first);
415 } else if (anEvol == TNaming_PRIMITIVE) {
416 aBuilder.Generated(aPairsIter->second);
417 } else if (anEvol == TNaming_SELECTED) {
418 aBuilder.Select(aPairsIter->second, aPairsIter->first);
423 TDF_LabelList anEmptyUpdated;
424 aNew->objects()->synchronizeFeatures(anEmptyUpdated, true, true, true, true);
428 Model_Session::Model_Session()
430 myPluginsInfoLoaded = false;
431 myCheckTransactions = true;
432 ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session>(this));
433 // register the configuration reading listener
434 Events_Loop* aLoop = Events_Loop::loop();
435 static const Events_ID kFeatureEvent =
436 Events_Loop::eventByName(Config_FeatureMessage::MODEL_EVENT());
437 aLoop->registerListener(this, kFeatureEvent);
438 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED), 0, true);
439 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED), 0, true);
440 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED), 0, true);
441 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_VALIDATOR_LOADED));
442 aLoop->registerListener(this, Events_Loop::eventByName(Config_PluginMessage::EVENT_ID()));
445 void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessage)
447 static const Events_ID kFeatureEvent =
448 Events_Loop::eventByName(Config_FeatureMessage::MODEL_EVENT());
449 static const Events_ID kValidatorEvent = Events_Loop::eventByName(EVENT_VALIDATOR_LOADED);
450 static const Events_ID kPluginEvent = Events_Loop::eventByName(Config_PluginMessage::EVENT_ID());
451 if (theMessage->eventID() == kFeatureEvent) {
452 const std::shared_ptr<Config_FeatureMessage> aMsg =
453 std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
456 // process the plugin info, load plugin
457 if (myPlugins.find(aMsg->id()) == myPlugins.end()) {
458 myPlugins[aMsg->id()] = std::pair<std::string, std::string>(
459 aMsg->pluginLibrary(), aMsg->documentKind());
462 const std::shared_ptr<Config_AttributeMessage> aMsgAttr =
463 std::dynamic_pointer_cast<Config_AttributeMessage>(theMessage);
466 if (!aMsgAttr->isObligatory()) {
467 validators()->registerNotObligatory(aMsgAttr->featureId(), aMsgAttr->attributeId());
469 if(aMsgAttr->isConcealment()) {
470 validators()->registerConcealment(aMsgAttr->featureId(), aMsgAttr->attributeId());
472 if(aMsgAttr->isMainArgument()) {
473 validators()->registerMainArgument(aMsgAttr->featureId(), aMsgAttr->attributeId());
475 const std::list<std::pair<std::string, std::string> >& aCases = aMsgAttr->getCases();
476 if (!aCases.empty()) {
477 validators()->registerCase(aMsgAttr->featureId(), aMsgAttr->attributeId(), aCases);
479 if (aMsgAttr->isGeometricalSelection()) {
480 validators()->registerGeometricalSelection(aMsgAttr->featureId(),
481 aMsgAttr->attributeId());
485 // plugins information was started to load, so, it will be loaded
486 myPluginsInfoLoaded = true;
487 } else if (theMessage->eventID() == kValidatorEvent) {
488 std::shared_ptr<Config_ValidatorMessage> aMsg =
489 std::dynamic_pointer_cast<Config_ValidatorMessage>(theMessage);
491 if (aMsg->attributeId().empty()) { // feature validator
492 validators()->assignValidator(aMsg->validatorId(), aMsg->featureId(), aMsg->parameters());
493 } else { // attribute validator
494 validators()->assignValidator(aMsg->validatorId(), aMsg->featureId(), aMsg->attributeId(),
498 } else if (theMessage->eventID() == kPluginEvent) { // plugin is started to load
499 std::shared_ptr<Config_PluginMessage> aMsg =
500 std::dynamic_pointer_cast<Config_PluginMessage>(theMessage);
502 myCurrentPluginName = aMsg->pluginId();
503 if (!aMsg->uses().empty()) {
504 myUsePlugins[myCurrentPluginName] = aMsg->uses();
507 } else { // create/update/delete
508 if (myCheckTransactions && !isOperation())
509 Events_InfoMessage("Model_Session",
510 "Modification of data structure outside of the transaction").send();
511 // if part is deleted, make the root as the current document (on undo of Parts creations)
512 static const Events_ID kDeletedEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED);
513 if (theMessage->eventID() == kDeletedEvent) {
514 std::shared_ptr<ModelAPI_ObjectDeletedMessage> aDeleted =
515 std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
517 std::list<std::pair<std::shared_ptr<ModelAPI_Document>, std::string>>::const_iterator
518 aGIter = aDeleted->groups().cbegin();
519 for (; aGIter != aDeleted->groups().cend(); aGIter++) {
520 if (aGIter->second == ModelAPI_ResultPart::group())
523 if (aGIter != aDeleted->groups().cend())
525 // check that the current feature of the session is still the active Part (even disabled)
527 FeaturePtr aCurrentPart = moduleDocument()->currentFeature(true);
528 if (aCurrentPart.get()) {
529 const std::list<std::shared_ptr<ModelAPI_Result> >& aResList = aCurrentPart->results();
530 std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes = aResList.begin();
531 for(; !aFound && aRes != aResList.end(); aRes++) {
532 ResultPartPtr aPRes = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aRes);
533 if (aPRes.get() && aPRes->isActivated() && aPRes->partDoc() == activeDocument()) {
539 if (!aFound) { // if not, the part was removed, so activate the module document
540 if (myCurrentDoc.get())
541 setActiveDocument(moduleDocument());
548 void Model_Session::LoadPluginsInfo()
550 if (myPluginsInfoLoaded) // nothing to do
552 // Read plugins information from XML files
553 Config_ModuleReader aModuleReader(Config_FeatureMessage::MODEL_EVENT());
554 aModuleReader.readAll();
555 std::set<std::string> aFiles = aModuleReader.modulePluginFiles();
556 std::set<std::string>::iterator it = aFiles.begin();
557 for ( ; it != aFiles.end(); it++ ) {
558 Config_ValidatorReader aValidatorReader (*it);
559 aValidatorReader.readAll();
564 void Model_Session::registerPlugin(ModelAPI_Plugin* thePlugin)
566 myPluginObjs[myCurrentPluginName] = thePlugin;
567 static Events_ID EVENT_LOAD = Events_Loop::loop()->eventByName(EVENT_PLUGIN_LOADED);
568 ModelAPI_EventCreator::get()->sendUpdated(ObjectPtr(), EVENT_LOAD, false);
569 // If the plugin has an ability to process GUI events, register it
570 Events_Listener* aListener = dynamic_cast<Events_Listener*>(thePlugin);
572 Events_Loop* aLoop = Events_Loop::loop();
573 static Events_ID aStateRequestEventId =
574 Events_Loop::loop()->eventByName(EVENT_FEATURE_STATE_REQUEST);
575 aLoop->registerListener(aListener, aStateRequestEventId);
579 ModelAPI_ValidatorsFactory* Model_Session::validators()
581 static Model_ValidatorsFactory* aFactory = new Model_ValidatorsFactory;
585 ModelAPI_FiltersFactory* Model_Session::filters()
587 static Model_FiltersFactory* aFactory = new Model_FiltersFactory;
591 int Model_Session::transactionID()
593 return ROOT_DOC->transactionID();
596 bool Model_Session::isAutoUpdateBlocked()
598 Handle(Model_Application) anApp = Model_Application::getApplication();
599 if (!anApp->hasRoot()) // when document is not yet created, do not create it by such simple call
601 return !ROOT_DOC->autoRecomutationState();
604 void Model_Session::blockAutoUpdate(const bool theBlock)
606 bool aCurrentState = isAutoUpdateBlocked();
607 if (aCurrentState != theBlock) {
608 // if there is no operation, start it to avoid modifications outside of transaction
609 bool isOperation = this->isOperation();
611 startOperation("Auto update");
612 ROOT_DOC->setAutoRecomutationState(!theBlock);
613 static Events_Loop* aLoop = Events_Loop::loop();
615 static const Events_ID kAutoOff = aLoop->eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE);
616 std::shared_ptr<Events_Message> aMsg(new Events_Message(kAutoOff));
619 // if there is no operation, start it to avoid modifications outside of transaction
620 bool isOperation = this->isOperation();
622 startOperation("Auto update enabling");
623 static const Events_ID kAutoOn = aLoop->eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE);
624 std::shared_ptr<Events_Message> aMsg(new Events_Message(kAutoOn));
629 // append this transaction to the previous one: don't need this separated operation in list
630 ROOT_DOC->appendTransactionToPrevious();