Salome HOME
Update copyright information
[modules/geom.git] / src / OperationGUI / OperationGUI_FilletDlg.cxx
index e18e1cb4c0466facc01b2dc689dd0fe7f3fce3b3..49a302a9c431330eba8ac6197cf2ba082b75ad0e 100644 (file)
@@ -1,23 +1,23 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  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
@@ -160,6 +160,8 @@ void OperationGUI_FilletDlg::Init()
   myFaces.Clear();
   myEdges.Clear();
 
+  showOnlyPreviewControl();
+
   // signals and slots connections
 
   // main buttons
@@ -292,7 +294,7 @@ void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId)
     else
       myEditCurrentArgument->setText("");
 
-    displayPreview();
+    processPreview();
   }
 
   qApp->processEvents();
@@ -306,6 +308,7 @@ void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId)
 //=================================================================================
 void OperationGUI_FilletDlg::ClickOnOk()
 {
+  setIsApplyAndClose( true );
   if (ClickOnApply())
     ClickOnCancel();
 }
@@ -345,14 +348,13 @@ void OperationGUI_FilletDlg::SelectionIntoArgument()
   {
     myShape = GEOM::GEOM_Object::_nil();
     if (aSelList.Extent() == 1) {
-      Standard_Boolean aResult = Standard_False;
       GEOM::GEOM_Object_var anObj =
-        GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+        GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
 
-      if (aResult && !anObj->_is_nil()) {
+      if ( !anObj->_is_nil() ) {
         myShape = anObj;
         myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
-        displayPreview();
+        processPreview();
       }
     }
 
@@ -365,11 +367,10 @@ void OperationGUI_FilletDlg::SelectionIntoArgument()
     if (myEditCurrentArgument == Group2->LineEdit2) myEdges.Clear();
     else myFaces.Clear();
     if (aSelList.Extent() == 1) {
-      Standard_Boolean aResult = Standard_False;
       GEOM::GEOM_Object_var anObj =
-        GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+        GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
 
-      if (aResult && !anObj->_is_nil()) {
+      if ( !anObj->_is_nil() ) {
         TColStd_IndexedMapOfInteger anIndexes;
         aSelMgr->GetIndexes(aSelList.First(), anIndexes);
 
@@ -391,7 +392,7 @@ void OperationGUI_FilletDlg::SelectionIntoArgument()
           else
             myFaces = anIndexes;
 
-          displayPreview();
+          processPreview();
         }
       }
     }
@@ -478,7 +479,7 @@ void OperationGUI_FilletDlg::SetEditCurrentArgument()
   activateSelection();
 
   // seems we need it only to avoid preview disappearing, caused by selection mode change
-  displayPreview();
+  processPreview();
 }
 
 //=================================================================================
@@ -530,7 +531,7 @@ void OperationGUI_FilletDlg::enterEvent (QEvent*)
 //=================================================================================
 void OperationGUI_FilletDlg::ValueChangedInSpinBox (double)
 {
-  displayPreview();
+  processPreview();
 }
 
 //=================================================================================
@@ -751,5 +752,5 @@ void OperationGUI_FilletDlg::RadioButtonClicked()
   Group3->RadioButton1->blockSignals(false);
   Group3->RadioButton2->blockSignals(false);
 
-  displayPreview();
+  processPreview();
 }