Salome HOME
A new event Visual Attributes Changed is defined for performance sake.
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintDistance.cpp
index 16a0451d4044c1987e970bf4b56adea306ed4e8a..391c1016234ecb1702b235963af676b10f31544e 100644 (file)
@@ -21,6 +21,7 @@
 #include <SketchPlugin_Point.h>
 #include <SketchPlugin_Circle.h>
 #include <SketchPlugin_Line.h>
+#include <SketchPlugin_Tools.h>
 
 #include <SketcherPrs_Tools.h>
 #include <SketcherPrs_Factory.h>
@@ -95,6 +96,8 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi
   AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this,
                                                                       sketch(),
                                                                       thePrevious);
+  if (anAIS.get() && !thePrevious.get())
+    SketchPlugin_Tools::setDimensionColor(anAIS);
   return anAIS;
 }