Salome HOME
Issue #2183 Can't change the preselected object below the mouse cursor
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Translation.cpp
index 4bd8aea03d2a0fb63918e6b35dd69329c907796e..f2978df942527eb5da3beb253cb8a83e4fbe44de 100644 (file)
@@ -1,10 +1,22 @@
-// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
-
-// File:        FeaturesPlugin_Translation.cpp
-// Created:     8 June 2015
-// Author:      Dmitry Bobylev
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
 //
-// Modified by Clarisse Genrault (CEA) : 17 Nov 2016
 
 #include <FeaturesPlugin_Translation.h>
 
@@ -18,6 +30,7 @@
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Lin.h>
+#include <GeomAPI_Trsf.h>
 
 #include <GeomAlgoAPI_PointBuilder.h>
 
@@ -31,7 +44,8 @@ FeaturesPlugin_Translation::FeaturesPlugin_Translation()
 //=================================================================================================
 void FeaturesPlugin_Translation::initAttributes()
 {
-  data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+  data()->addAttribute(FeaturesPlugin_Translation::CREATION_METHOD(),
+                       ModelAPI_AttributeString::typeId());
 
   AttributeSelectionListPtr aSelection =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
@@ -355,11 +369,10 @@ void FeaturesPlugin_Translation::loadNamingDS(GeomAlgoAPI_Translation& theTransl
   // Store result.
   theResultBody->storeModified(theBaseShape, theTranslationAlgo.shape());
 
-  int aTranslatedTag = 1;
   std::string aTranslatedName = "Translated";
   std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = theTranslationAlgo.mapOfSubShapes();
 
   FeaturesPlugin_Tools::storeModifiedShapes(theTranslationAlgo, theResultBody,
-                                            theBaseShape, aTranslatedTag, aTranslatedName,
+                                            theBaseShape, 1, 2, 3, aTranslatedName,
                                             *aSubShapes.get());
 }