From d416d0b0f5089298ba57d6620f535540929ea51a Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 11 Sep 2014 17:12:00 +0400 Subject: [PATCH] Update Objects tree on document's change --- src/XGUI/XGUI_DocumentDataModel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.39.2