Salome HOME
Fix for plane selection. Selection attribute return empty shape for construction.
authordbv <dbv@opencascade.com>
Wed, 20 Apr 2016 07:22:33 +0000 (10:22 +0300)
committerdbv <dbv@opencascade.com>
Wed, 20 Apr 2016 07:27:37 +0000 (10:27 +0300)
src/Model/Model_AttributeSelection.cpp

index 25f5d35339a28c04cd3e9a44af6e16c93b604f4f..960305ca6d4a47a23b07709ab594c120206ef149 100644 (file)
@@ -181,11 +181,16 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext,
 
 std::shared_ptr<GeomAPI_Shape> Model_AttributeSelection::value()
 {
+  GeomShapePtr aResult;
   if (myTmpContext.get() || myTmpSubShape.get()) {
+    ResultConstructionPtr aResulConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(myTmpContext);
+    if(aResulConstruction.get()) {
+      // it is just reference to construction, nothing is in value
+      return aResult;
+    }
     return myTmpSubShape.get() ? myTmpSubShape : myTmpContext->shape();
   }
 
-  std::shared_ptr<GeomAPI_Shape> aResult;
   TDF_Label aSelLab = selectionLabel();
   if (aSelLab.IsAttribute(kINVALID_SELECTION))
     return aResult;