]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1550 Correction for external objects, case: Create extrusion(on circle), start...
authornds <nds@opencascade.com>
Fri, 17 Jun 2016 08:21:56 +0000 (11:21 +0300)
committernds <nds@opencascade.com>
Fri, 17 Jun 2016 08:22:41 +0000 (11:22 +0300)
src/PartSet/PartSet_ExternalObjectsMgr.cpp

index 98bcf3d1c727541a48c1407333260fc9cd7df7db..c636f5b3bfd019bd861be5616dff6ed49de9d399 100755 (executable)
@@ -47,6 +47,16 @@ ObjectPtr PartSet_ExternalObjectsMgr::externalObject(const ObjectPtr& theSelecte
 {
   ObjectPtr aSelectedObject = PartSet_Tools::findFixedObjectByExternal(
                                   theShape->impl<TopoDS_Shape>(), theSelectedObject, theSketch);
+  FeaturePtr aFeature = ModelAPI_Feature::feature(aSelectedObject);
+  if (aFeature.get()) {
+    std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
+                            std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
+    /// some sketch entities should be never shown, e.g. projection feature
+    /// such external features should not be used in selection
+    if (aSketchFeature.get() && !aSketchFeature->canBeDisplayed())
+      return ObjectPtr();
+  }
+
   if (!aSelectedObject.get()) {
     // Processing of external (non-sketch) object
     aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape->impl<TopoDS_Shape>(),