X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_DocumentDataModel.cpp;h=2744d196d4114b08b7ae71f7ed55397bb2b75454;hb=ed165fd07e71c11885fdc5f475a8522a5914e00d;hp=feb3c0b5e9a4e18fb3ea966952e6e80603fdfd1e;hpb=6d9f778b60206147106c918852c4a9595898f892;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index feb3c0b5e..2744d196d 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -44,14 +44,14 @@ XGUI_DocumentDataModel::~XGUI_DocumentDataModel() clearModelIndexes(); } -void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage) +void XGUI_DocumentDataModel::processEvent(const boost::shared_ptr& theMessage) { DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument(); // Created object event ******************* if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) { - const ModelAPI_ObjectUpdatedMessage* aUpdMsg = - dynamic_cast(theMessage); + boost::shared_ptr aUpdMsg = + boost::dynamic_pointer_cast(theMessage); std::set aObjects = aUpdMsg->objects(); std::set::const_iterator aIt; @@ -97,8 +97,8 @@ void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage) } // Deleted object event *********************** } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)) { - const ModelAPI_ObjectDeletedMessage* aUpdMsg = - dynamic_cast(theMessage); + boost::shared_ptr aUpdMsg = + boost::dynamic_pointer_cast(theMessage); DocumentPtr aDoc = aUpdMsg->document(); std::set aGroups = aUpdMsg->groups(); @@ -140,7 +140,7 @@ void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage) } // Deleted object event *********************** } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) { - //const ModelAPI_ObjectUpdatedMessage* aUpdMsg = dynamic_cast(theMessage); + //boost::shared_ptr aUpdMsg = boost::dynamic_pointer_cast(theMessage); //ObjectPtr aFeature = aUpdMsg->feature(); //DocumentPtr aDoc = aFeature->document(); @@ -477,7 +477,7 @@ bool XGUI_DocumentDataModel::activatedIndex(const QModelIndex& theIndex) myActivePart->setItemsColor(ACTIVE_COLOR); myModel->setItemsColor(PASSIVE_COLOR); } else - myModel->setItemsColor(ACTIVE_COLOR); + myModel->setItemsColor(ACTIVE_COLOR); return true; } }