Salome HOME
Merge remote-tracking branch 'remotes/origin/HighLevelDump'
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintHorizontal.cpp
index 9fe7e5188793955e98975860a063f0acaf706abf..558b44a3ddaa4aa6eea1af177f350db1f23579c2 100644 (file)
@@ -14,6 +14,7 @@
 #include <SketchPlugin_Sketch.h>
 
 #include <SketcherPrs_Factory.h>
+//#include <SketcherPrs_Tools.h>
 
 #include <Config_PropManager.h>
 
@@ -35,11 +36,8 @@ AISObjectPtr SketchPlugin_ConstraintHorizontal::getAISObject(AISObjectPtr thePre
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = thePrevious;
-  if (!anAIS) {
-    anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane());
-  }
+  AISObjectPtr anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane(),
+                                                                 thePrevious);
   return anAIS;
 }
 
-