Salome HOME
Rectangle correction to have coincidence with point/line selected for the first point...
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Point.cpp
index 231e54fb2cddaa70bbcfbeb0b7d9f0adfe269791..c164e44a40225855d89111b0ed14b17be1a45e2e 100644 (file)
@@ -29,9 +29,9 @@ const std::string& ConstructionPlugin_Point::getKind()
 
 void ConstructionPlugin_Point::initAttributes()
 {
-  data()->addAttribute(ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble::type());
+  data()->addAttribute(ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble::typeId());
 }
 
 void ConstructionPlugin_Point::execute()
@@ -46,10 +46,12 @@ void ConstructionPlugin_Point::execute()
   setResult(aConstr);
 }
 
-void ConstructionPlugin_Point::customisePresentation(AISObjectPtr thePrs)
+bool ConstructionPlugin_Point::customisePresentation(ResultPtr theResult, 
+                                                     AISObjectPtr thePrs,
+                               std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
 {
-  std::vector<int> aRGB = Config_PropManager::color("Visualization", "construction_point_color",
-                                                    ConstructionPlugin_Point::DEFAULT_COLOR());
-  thePrs->setColor(aRGB[0], aRGB[1], aRGB[2]);
-  thePrs->redisplay();
+  bool isCustomized = theDefaultPrs.get() != NULL &&
+                      theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
+  //thePrs->setPointMarker(1, 1.); // Set point as a '+' symbol
+  return true;
 }