X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSetPlugin%2FPartSetPlugin_Duplicate.cpp;h=7f94e6943b48dc7f47c925de3681f0d343c6ec70;hb=cd9217d7e87997ec8bc150a6d8c389e742ca0f84;hp=28c8ce3defba9d875f50bba959f1f6502ce5edab;hpb=4224f4dbe7ceaefe74b5d6b79a5840a9f5df2d7a;p=modules%2Fshaper.git diff --git a/src/PartSetPlugin/PartSetPlugin_Duplicate.cpp b/src/PartSetPlugin/PartSetPlugin_Duplicate.cpp index 28c8ce3de..7f94e6943 100644 --- a/src/PartSetPlugin/PartSetPlugin_Duplicate.cpp +++ b/src/PartSetPlugin/PartSetPlugin_Duplicate.cpp @@ -22,19 +22,18 @@ void PartSetPlugin_Duplicate::initAttributes() boost::shared_ptr aPManager = ModelAPI_PluginManager::get(); boost::shared_ptr aRoot = aPManager->rootDocument(); - boost::shared_ptr aSource; // searching for source document attribute - for(int a = aRoot->size(getGroup()) - 1; a >= 0; a--) { + boost::shared_ptr aSource; // searching for source document attribute + for (int a = aRoot->size(getGroup()) - 1; a >= 0; a--) { aSource = boost::dynamic_pointer_cast(aRoot->object(getGroup(), a)); - if (aSource && aSource->data() && - aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value() == - aPManager->currentDocument()) + if (aSource && aSource->data() + && aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value() + == aPManager->currentDocument()) break; aSource.reset(); } if (aSource) { boost::shared_ptr aCopy = aPManager->copy( - aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value(), - data()->name()); + aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value(), data()->name()); data()->refattr(ORIGIN_REF())->setObject(aSource); } }