]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp
Salome HOME
2.17. Improved management of overconstraint situation: dimension constraints are...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintRadius.cpp
index 03854444b38043e20e2ada403933b0f5a63849f7..e9ce8ae6a5990da4cc541cd63139193fa88b76be 100644 (file)
@@ -40,6 +40,14 @@ void SketchPlugin_ConstraintRadius::initAttributes()
   data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
 }
 
+void SketchPlugin_ConstraintRadius::colorConfigInfo(std::string& theSection, std::string& theName,
+                                                    std::string& theDefault)
+{
+  theSection = "Visualization";
+  theName = "sketch_dimension_color";
+  theDefault = SKETCH_DIMENSION_COLOR;
+}
+
 void SketchPlugin_ConstraintRadius::execute()
 {
   std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
@@ -148,11 +156,6 @@ AISObjectPtr SketchPlugin_ConstraintRadius::getAISObject(AISObjectPtr thePreviou
   if (!anAIS) {
     anAIS = SketcherPrs_Factory::radiusConstraint(this, sketch()->coordinatePlane());
   }
-
-  // Set color from preferences
-  std::vector<int> aRGB = Config_PropManager::color("Visualization", "sketch_dimension_color",
-                                                    SKETCH_DIMENSION_COLOR);
-  anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]);
   return anAIS;
 }