Salome HOME
Merge branch 'V7_7_BR' into hydro/imps_2015
[modules/geom.git] / src / GenerationGUI / GenerationGUI_RevolDlg.cxx
index 5e1e3f022e926396fbf6915ae519e1a1c7d8162f..2d798fcbfafd8547a42eee2ca98e3049ecdd23f6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// 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
@@ -195,7 +195,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
     for ( int i = 0; i < objects.count(); i++ ) {
       GEOM::shape_type stype = objects[i]->GetMaxShapeType();
       if ( stype < GEOM::SHELL || stype > GEOM::VERTEX )
-       continue;
+        continue;
       myBaseObjects << objects[i];
     }
     if ( !myBaseObjects.isEmpty() ) {
@@ -209,7 +209,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
       QString aName = GEOMBase::GetName( myAxis.get() );
       myEditCurrentArgument->setText( aName );
       if ( myBaseObjects.isEmpty() )
-       GroupPoints->PushButton1->click();
+        GroupPoints->PushButton1->click();
     }
   }
   processPreview();
@@ -234,7 +234,7 @@ void GenerationGUI_RevolDlg::SetEditCurrentArgument()
     myEditCurrentArgument = GroupPoints->LineEdit2;
     GroupPoints->PushButton1->setDown(false);
     GroupPoints->LineEdit1->setEnabled(false);
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+    localSelection(TopAbs_EDGE);
   }
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
@@ -375,3 +375,14 @@ bool GenerationGUI_RevolDlg::extractPrefix() const
 {
   return myBaseObjects.count() > 1;
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> GenerationGUI_RevolDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res(myBaseObjects);
+  res << myAxis;
+  return res;
+}