From: vsv Date: Thu, 11 Sep 2014 13:12:00 +0000 (+0400) Subject: Update Objects tree on document's change X-Git-Tag: V_0.4.4~69^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d416d0b0f5089298ba57d6620f535540929ea51a;p=modules%2Fshaper.git Update Objects tree on document's change --- diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index 291c193e8..35198dccc 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -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);