X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Events.cpp;h=3a060d43f01fac344c320019bf1acb6543e0bf5e;hb=41f9517e84ae934ce536718d4f48e26731c8430d;hp=fb5b650d1e068cfdaa3e22588461e65e9e19ba45;hpb=5a0a094f0e94be8b4fd7b733e2f6e028b06f0517;p=modules%2Fshaper.git diff --git a/src/Model/Model_Events.cpp b/src/Model/Model_Events.cpp index fb5b650d1..3a060d43f 100644 --- a/src/Model/Model_Events.cpp +++ b/src/Model/Model_Events.cpp @@ -27,11 +27,10 @@ void Model_EventCreator::sendDeleted(const std::shared_ptr& t Events_Loop::loop()->send(aMsg, true); } -void Model_EventCreator::sendReordered(const std::shared_ptr& theDoc, - const std::string& theGroup) const +void Model_EventCreator::sendReordered(const std::shared_ptr& theReordered) const { std::shared_ptr aMsg( - new Model_OrderUpdatedMessage(theDoc, theGroup)); + new Model_OrderUpdatedMessage(theReordered)); Events_Loop::loop()->send(aMsg, true); } @@ -64,7 +63,7 @@ std::shared_ptr Model_ObjectUpdatedMessage::newEmpty() void Model_ObjectUpdatedMessage::Join(const std::shared_ptr& theJoined) { - std::shared_ptr aJoined = + std::shared_ptr aJoined = std::dynamic_pointer_cast(theJoined); std::set::iterator aFIter = aJoined->myObjects.begin(); for (; aFIter != aJoined->myObjects.end(); aFIter++) { @@ -95,7 +94,7 @@ const Events_ID Model_ObjectDeletedMessage::messageId() void Model_ObjectDeletedMessage::Join(const std::shared_ptr& theJoined) { - std::shared_ptr aJoined = + std::shared_ptr aJoined = std::dynamic_pointer_cast(theJoined); std::set::iterator aGIter = aJoined->myGroups.begin(); for (; aGIter != aJoined->myGroups.end(); aGIter++) { @@ -105,17 +104,10 @@ void Model_ObjectDeletedMessage::Join(const std::shared_ptr /////////////////////// REORDERED MESSAGE ///////////////////////////// Model_OrderUpdatedMessage::Model_OrderUpdatedMessage( - const std::shared_ptr& theDoc, const std::string& theGroup) - : ModelAPI_OrderUpdatedMessage(messageId(), 0), - myDoc(theDoc) -{ - if (!theGroup.empty()) - myGroups.insert(theGroup); -} - -std::shared_ptr Model_OrderUpdatedMessage::newEmpty() + FeaturePtr theReordered, const void* theSender) + : ModelAPI_OrderUpdatedMessage(messageId(), theSender), + myReordered(theReordered) { - return std::shared_ptr(new Model_OrderUpdatedMessage(myDoc, "")); } const Events_ID Model_OrderUpdatedMessage::messageId() @@ -123,13 +115,3 @@ const Events_ID Model_OrderUpdatedMessage::messageId() static Events_ID MY_ID = Events_Loop::eventByName(EVENT_ORDER_UPDATED); return MY_ID; } - -void Model_OrderUpdatedMessage::Join(const std::shared_ptr& theJoined) -{ - std::shared_ptr aJoined = - std::dynamic_pointer_cast(theJoined); - std::set::iterator aGIter = aJoined->myGroups.begin(); - for (; aGIter != aJoined->myGroups.end(); aGIter++) { - myGroups.insert(*aGIter); - } -}