Salome HOME
Fix the SHAPER version of resources
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Mirror.cpp
index 499cfc7a23fc6b01e937ffa10b09ff6fa14d1d53..30bbc6ec33ceba0d29740ace179e984cf1bf37bf 100644 (file)
@@ -57,7 +57,7 @@ bool SketcherPrs_Mirror::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Mirror::updatePoints(double theStep) const
+bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -81,12 +81,16 @@ bool SketcherPrs_Mirror::updatePoints(double theStep) const
   // get position for each source object
   for (i = 0; i < aNb; i++) {
     aObj = anAttrB->object(i);
+    if (SketcherPrs_Tools::getShape(aObj).get() == NULL)
+      continue;
     aP1 = aMgr->getPosition(aObj, this, theStep);
     myPntArray->SetVertice(i + 1, aP1);
   }  
   // Get position of each mirrored object
   for (i = 0; i < aNb; i++) {
     aObj = anAttrC->object(i);
+    if (SketcherPrs_Tools::getShape(aObj).get() == NULL)
+      continue;
     aP1 = aMgr->getPosition(aObj, this, theStep);
     myPntArray->SetVertice(aNb + i + 1, aP1);
   }