]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Coincidence correction concerning the next regression: line to be coincident to anoth...
authornds <nds@opencascade.com>
Tue, 26 Apr 2016 07:39:12 +0000 (10:39 +0300)
committernds <nds@opencascade.com>
Tue, 26 Apr 2016 07:39:12 +0000 (10:39 +0300)
src/SketcherPrs/SketcherPrs_Coincident.cpp

index 09d58072ee0f0d77ff73e322a0aa6762e5140234..2b6c57b846dbeaa146caa129e13a9ba5d27dac8c 100644 (file)
@@ -56,13 +56,13 @@ bool SketcherPrs_Coincident::readyToDisplay(ModelAPI_Feature* theConstraint,
   // Get point of the presentation
   std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theConstraint,
                                                               SketchPlugin_Constraint::ENTITY_A());
-  if (aPnt.get()) {
+  if (aPnt.get() == NULL)
     aPnt = SketcherPrs_Tools::getPoint(theConstraint, SketchPlugin_Constraint::ENTITY_B());
-    aReadyToDisplay = aPnt.get() != NULL;
-    if (aReadyToDisplay) {
-      std::shared_ptr<GeomAPI_Pnt> aPoint = thePlane->to3D(aPnt->x(), aPnt->y());
-      thePoint = aPoint->impl<gp_Pnt>();
-    }
+
+  aReadyToDisplay = aPnt.get() != NULL;
+  if (aReadyToDisplay) {
+    std::shared_ptr<GeomAPI_Pnt> aPoint = thePlane->to3D(aPnt->x(), aPnt->y());
+    thePoint = aPoint->impl<gp_Pnt>();
   }
   return aReadyToDisplay;
 }