X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Line.cpp;h=33d087d2c6d5aff70cd11cd44c739062cd2ecff3;hb=752c9e02e6aa8ced24e9b53097cb42540d5e6a08;hp=555b8ae7f4e18e85e3d490e5537bd7a6fd2c899e;hpb=a1a507560dbc3226167cc11fc27b5caba672edba;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Line.cpp b/src/SketchPlugin/SketchPlugin_Line.cpp index 555b8ae7f..33d087d2c 100644 --- a/src/SketchPlugin/SketchPlugin_Line.cpp +++ b/src/SketchPlugin/SketchPlugin_Line.cpp @@ -26,10 +26,8 @@ SketchPlugin_Line::SketchPlugin_Line() : SketchPlugin_SketchEntity() {} -void SketchPlugin_Line::initAttributes() +void SketchPlugin_Line::initDerivedClassAttributes() { - SketchPlugin_SketchEntity::initAttributes(); - data()->addAttribute(START_ID(), GeomDataAPI_Point2D::typeId()); data()->addAttribute(END_ID(), GeomDataAPI_Point2D::typeId()); data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId()); @@ -111,7 +109,8 @@ bool SketchPlugin_Line::isFixed() { } void SketchPlugin_Line::attributeChanged(const std::string& theID) { - if (theID == EXTERNAL_ID()) { + // the second condition for unability to move external segments anywhere + if (theID == EXTERNAL_ID() || isFixed()) { std::shared_ptr aSelection = data()->selection(EXTERNAL_ID())->value(); // update arguments due to the selection value if (aSelection && !aSelection->isNull() && aSelection->isEdge()) { @@ -125,4 +124,3 @@ void SketchPlugin_Line::attributeChanged(const std::string& theID) { } } } -