Salome HOME
Update unit-tests for SketchPlugin (part III)
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Line.cpp
index f4382e4314af3983bc7a57310c8228aa4a2128f2..c69b6019b66178402ed5428caee05798617e002a 100644 (file)
@@ -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());
@@ -112,7 +110,9 @@ bool SketchPlugin_Line::isFixed() {
 
 void SketchPlugin_Line::attributeChanged(const std::string& theID) {
   // the second condition for unability to move external segments anywhere
-  if (theID == EXTERNAL_ID() || isFixed()) {
+  // isCopy() is checked temporary for case when copied lines stored external id state
+  // to be removed after debug
+  if ((theID == EXTERNAL_ID() || isFixed()) && !isCopy()) {
     std::shared_ptr<GeomAPI_Shape> aSelection = data()->selection(EXTERNAL_ID())->value();
      // update arguments due to the selection value
     if (aSelection && !aSelection->isNull() && aSelection->isEdge()) {