Salome HOME
Issue #1664 In the Sketcher, add the function Split a segment
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_SketchEntity.h
index 864b25b41efe6b8bc812b28bb737f420fea215ac..3174d09ea94c4c964263fcfaf395a72f4c93b371 100644 (file)
@@ -57,7 +57,7 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC
   /// Width of the auxiliary line
   inline static const double SKETCH_LINE_WIDTH_AUXILIARY()
   {
-    return 1;
+    return 2;
   }
 
   /// Width of the line
@@ -86,7 +86,7 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC
   {
     AttributeSelectionPtr aAttr = data()->selection(EXTERNAL_ID());
     if (aAttr)
-      return aAttr->context().get() != NULL;
+      return aAttr->context().get() != NULL && !aAttr->isInvalid();
     return false;
   }
 
@@ -104,7 +104,9 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC
   virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
                                      std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
   {
-    bool isCustomized = false;
+    //bool isCustomized = false;
+    bool isCustomized = theDefaultPrs.get() != NULL &&
+                        theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
     int aShapeType = thePrs->getShapeType();
     // a compound is processed like the edge because the arc feature uses the compound for presentable AIS
     if (aShapeType != 6/*an edge*/ && aShapeType != 7/*a vertex*/ && aShapeType != 0/*compound*/)