Salome HOME
Fix for the issue #3195 : The groups built by "Group Addtion" are not in ShaperResults
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintDistanceAlongDir.cpp
index 35def2323d07fd1537ad83e7cd2a2c3a183ed7fd..bd45029bafd3d17f65b1185a07f45b8d6af34fbe 100644 (file)
@@ -22,6 +22,7 @@
 // Author:  Artem ZHIDKOV
 
 #include <SketchPlugin_ConstraintDistanceAlongDir.h>
+#include <SketchPlugin_Tools.h>
 
 #include <SketcherPrs_Tools.h>
 #include <SketcherPrs_Factory.h>
@@ -82,8 +83,10 @@ AISObjectPtr SketchPlugin_ConstraintDistanceAlongDir::getAISObject(AISObjectPtr
     return thePrevious;
 
   AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this,
-                                                                      sketch()->coordinatePlane(),
+                                                                      sketch(),
                                                                       thePrevious);
+  if (anAIS.get() && !thePrevious.get())
+    SketchPlugin_Tools::setDimensionColor(anAIS);
   return anAIS;
 }