]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update Objects tree on document's change
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 11 Sep 2014 13:12:00 +0000 (17:12 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 11 Sep 2014 13:12:00 +0000 (17:12 +0400)
src/XGUI/XGUI_DocumentDataModel.cpp

index 291c193e8ad64576d7320ee7ed931395f6c9829b..35198dccc09d1bc49e5c8c698e538e2ab70b5f6a 100644 (file)
@@ -29,9 +29,11 @@ XGUI_DocumentDataModel::XGUI_DocumentDataModel(QObject* theParent)
       myActivePart(0)
 {
   // Register in event loop
-  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
-  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
-  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+  Events_Loop* aLoop = Events_Loop::loop();
+  aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
+  aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+  aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+  aLoop->registerListener(this, Events_Loop::eventByName("CurrentDocumentChanged"));
 
   // Create a top part of data tree model
   myModel = new XGUI_TopDataModel(this);