Salome HOME
Issue #3240: Angular Copy is not possible for projected entity
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_SketchEntity.cpp
index 2ec1f2dadb29b9dba1b9345c43ff78a49c04bcaa..fb64f079c1e1b9fd7c2fbdc09e4bd272939eb835 100644 (file)
@@ -1,7 +1,25 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include "SketchPlugin_SketchEntity.h"
 
+#include <ModelAPI_AttributeReference.h>
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Validator.h>
 
@@ -21,4 +39,8 @@ void SketchPlugin_SketchEntity::initAttributes()
   anAttr->setIsArgument(false);
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
     SketchPlugin_SketchEntity::COPY_ID());
+
+  anAttr = data()->addAttribute(PARENT_ID(), ModelAPI_AttributeReference::typeId());
+  anAttr->setIsArgument(false);
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), PARENT_ID());
 }