Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/shaper
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintLength.cpp
index 289548b341e534f665ed039c74d21e28b85250b5..ad6ee92b540721d4df98d217917d2eee2c9efc47 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "SketchPlugin_ConstraintLength.h"
 #include <SketchPlugin_Line.h>
+#include <SketchPlugin_Tools.h>
 
 #include <GeomDataAPI_Point2D.h>
 
@@ -170,7 +171,9 @@ AISObjectPtr SketchPlugin_ConstraintLength::getAISObject(AISObjectPtr thePreviou
     return thePrevious;
 
   AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this,
-    sketch()->coordinatePlane(), thePrevious);
+    sketch(), thePrevious);
+  if (anAIS.get() && !thePrevious.get())
+    SketchPlugin_Tools::setDimensionColor(anAIS);
   return anAIS;
 }