]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx
Salome HOME
0021672: [CEA 565] Dump Study from script
[modules/geom.git] / src / OperationGUI / OperationGUI_Fillet1d2dDlg.cxx
index c7295e95dd22d9cbf403ccd4977853369770d52c..16cc60845500da1b2e9a64b1b967b5fd032a4638 100644 (file)
@@ -1,26 +1,26 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  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.
+// 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.
 //
-//  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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 // GEOM GEOMGUI : GUI for Geometry component
 // File   : OperationGUI_Fillet1d2dDlg.cxx
 // Author : DMV, OCN.
-//
+
 #include "OperationGUI_Fillet1d2dDlg.h"
 
 #include <DlgRef.h>
@@ -215,7 +215,8 @@ void OperationGUI_Fillet1d2dDlg::SelectionIntoArgument()
               anObj = aFindedObject; // get Object from study
           }
           else { // Global Selection
-            if ( aShape.ShapeType() != (myIs1D ? TopAbs_WIRE : TopAbs_FACE) ) {
+            if ((myIs1D && aShape.ShapeType() != TopAbs_WIRE) ||
+                (!myIs1D && aShape.ShapeType() != TopAbs_FACE && aShape.ShapeType() != TopAbs_SHELL)) {
               anObj = GEOM::GEOM_Object::_nil();
               aName = "";
             }
@@ -349,8 +350,15 @@ void OperationGUI_Fillet1d2dDlg::activateSelection()
   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
   globalSelection();
   if (myEditCurrentArgument == GroupVertexes->LineEdit1)
-    globalSelection( myIs1D ? GEOM_WIRE : GEOM_FACE );  // localSelection(myShape, myIs1D ? TopAbs_WIRE 
-                                                                                       // : TopAbs_FACE);
+    //localSelection(myShape, myIs1D ? TopAbs_WIRE : TopAbs_FACE);
+    if (myIs1D)
+      globalSelection(GEOM_WIRE);
+    else {
+      TColStd_MapOfInteger aMap;
+      aMap.Add(GEOM_FACE);
+      aMap.Add(GEOM_SHELL);
+      globalSelection(aMap);
+    }
   else if (!myShape->_is_nil() && myEditCurrentArgument == GroupVertexes->LineEdit2)
     localSelection(myShape, TopAbs_VERTEX);