SketchPlugin_Line::SketchPlugin_Line()
: SketchPlugin_Feature()
-{
-}
+{}
void SketchPlugin_Line::initAttributes()
{
void SketchPlugin_Line::attributeChanged() {
static bool myIsUpdated = false; // to avoid infinitive cycle on attrubtes change
boost::shared_ptr<GeomAPI_Shape> aSelection = data()->selection(EXTERNAL_ID())->value();
- if (aSelection && !myIsUpdated) { // update arguments due to the selection value
+ // update arguments due to the selection value
+ if (aSelection && !aSelection->isNull() && !myIsUpdated) {
myIsUpdated = true;
boost::shared_ptr<GeomAPI_Edge> anEdge( new GeomAPI_Edge(aSelection));
boost::shared_ptr<GeomDataAPI_Point2D> aStartAttr =