From 2c1016b72a6b120d9d40e6483ffceb40163cb34c Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 29 May 2015 10:40:14 +0300 Subject: [PATCH] Delete: never delete results. About "Part" deletion: only one selected part can be deleted(realisation in PartSet), part objects are skipped in Workshop in delete algorithm. Fix for delete sketch features. --- src/PartSet/PartSet_Module.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 8476879f1..b71077c86 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -532,8 +532,12 @@ bool PartSet_Module::deleteObjects() QObjectPtrList::const_iterator anIt = aSelectedObj.begin(), aLast = aSelectedObj.end(); for ( ; anIt != aLast; anIt++) { ObjectPtr anObject = *anIt; - if (mySketchMgr->isObjectOfSketch(anObject)) - aSketchObjects.append(anObject); + if (mySketchMgr->isObjectOfSketch(anObject)) { + // sketch feature should be used in this list because workshop deletes features only + // results are skipped + FeaturePtr aSketchFeature = ModelAPI_Feature::feature(anObject); + aSketchObjects.append(aSketchFeature); + } } // if the selection contains only local selected presentations from other sketches, // the Delete operation should not be done at all -- 2.39.2