: 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());
}
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<GeomAPI_Shape> aSelection = data()->selection(EXTERNAL_ID())->value();
// update arguments due to the selection value
if (aSelection && !aSelection->isNull() && aSelection->isEdge()) {
}
}
}
-