X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_ExternalObjectsMgr.cpp;h=54608476b671021210654dc4ff9ca73fe3a3b1fc;hb=7cb6ac084270943d926ec7ef35bf9e63d6a3eaf5;hp=df63169bcca030b776758ccd2dfbd51b25876f9a;hpb=8f09d362a50ccbc085841c24af2e755121e458ba;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_ExternalObjectsMgr.cpp b/src/PartSet/PartSet_ExternalObjectsMgr.cpp index df63169bc..54608476b 100755 --- a/src/PartSet/PartSet_ExternalObjectsMgr.cpp +++ b/src/PartSet/PartSet_ExternalObjectsMgr.cpp @@ -51,34 +51,12 @@ ObjectPtr PartSet_ExternalObjectsMgr::externalObject(const ObjectPtr& theSelecte // Processing of external (non-sketch) object aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape->impl(), theSelectedObject, theSketch, theTemporary); - if (aSelectedObject.get()) { - if (theTemporary) + if (aSelectedObject.get() && theTemporary) myExternalObjectValidated = aSelectedObject; - else - myExternalObjects.append(aSelectedObject); - } } return aSelectedObject; } -//******************************************************************** -/*ObjectPtr PartSet_ExternalObjectsMgr::externalObjectValidated(const ObjectPtr& theSelectedObject, - const GeomShapePtr& theShape, - const CompositeFeaturePtr& theSketch) -{ - // TODO(nds): unite with externalObject() - ObjectPtr aSelectedObject = PartSet_Tools::findFixedObjectByExternal(theShape->impl(), - theSelectedObject, theSketch); - if (!aSelectedObject.get()) { - // Processing of external (non-sketch) object - aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape->impl(), - theSelectedObject, theSketch); - if (aSelectedObject.get()) - myExternalObjectValidated = aSelectedObject; - } - return aSelectedObject; -}*/ - //******************************************************************** void PartSet_ExternalObjectsMgr::removeExternal(const CompositeFeaturePtr& theSketch, const FeaturePtr& theFeature, @@ -87,50 +65,10 @@ void PartSet_ExternalObjectsMgr::removeExternal(const CompositeFeaturePtr& theSk { if (theTemporary) removeExternalObject(myExternalObjectValidated, theSketch, theFeature, theWorkshop); - else{ - QObjectPtrList::const_iterator anIt = myExternalObjects.begin(), aLast = myExternalObjects.end(); - for (; anIt != aLast; anIt++) { - ObjectPtr anObject = *anIt; - removeExternalObject(anObject, theSketch, theFeature, theWorkshop); - } - myExternalObjects.clear(); - } -} - -//******************************************************************** -void PartSet_ExternalObjectsMgr::removeUnusedExternalObjects(const QObjectPtrList& theIgnoreObjects, - const CompositeFeaturePtr& theSketch, - const FeaturePtr& theFeature) -{ - /* - // TODO(nds): unite with removeExternal(), remove parameters - QObjectPtrList aUsedExternalObjects; - - QObjectPtrList::const_iterator anIt = myExternalObjects.begin(), aLast = myExternalObjects.end(); - for (; anIt != aLast; anIt++) { - ObjectPtr anObject = *anIt; - if (theIgnoreObjects.contains(anObject)) - aUsedExternalObjects.append(anObject); - else - removeExternalObject(anObject, theSketch, theFeature); - }*/ - myExternalObjects.clear(); - //if (!aUsedExternalObjects.empty()) - // myExternalObjects = aUsedExternalObjects; } -//******************************************************************** -/*void PartSet_ExternalObjectsMgr::removeExternalValidated(const CompositeFeaturePtr& theSketch, - const FeaturePtr& theFeature, - ModuleBase_IWorkshop* theWorkshop) -{ - // TODO(nds): unite with removeExternal(), remove parameters - removeExternalObject(myExternalObjectValidated, theSketch, theFeature, theWorkshop); - myExternalObjectValidated = ObjectPtr(); -}*/ - void PartSet_ExternalObjectsMgr::removeExternalObject(const ObjectPtr& theObject, - const CompositeFeaturePtr& theSketch, + const CompositeFeaturePtr& /*theSketch*/, const FeaturePtr& theFeature, ModuleBase_IWorkshop* theWorkshop) {