Salome HOME
Read translations
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintCoincidence.cpp
index a78e1b4efc2d0b7b0aeddfc959586679345ecb63..4b9a022bf223b7fd5077a414b5a68e5a8c355af0 100644 (file)
@@ -8,12 +8,6 @@
 
 #include <SketcherPrs_Factory.h>
 
-#include <ModelAPI_AttributeDouble.h>
-#include <ModelAPI_Data.h>
-#include <SketchPlugin_Point.h>
-#include <GeomDataAPI_Dir.h>
-#include <GeomDataAPI_Point.h>
-
 SketchPlugin_ConstraintCoincidence::SketchPlugin_ConstraintCoincidence()
 {
 }
@@ -33,10 +27,7 @@ AISObjectPtr SketchPlugin_ConstraintCoincidence::getAISObject(AISObjectPtr thePr
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = thePrevious;
-  if (!anAIS) {
-    anAIS = SketcherPrs_Factory::coincidentConstraint(this, sketch()->coordinatePlane());
-    anAIS->setColor(0, 0, 255);
-  }
+  AISObjectPtr anAIS = SketcherPrs_Factory::coincidentConstraint(this, sketch()->coordinatePlane(),
+                                                                 thePrevious);
   return anAIS;
 }