]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx
Salome HOME
0021672: [CEA 565] Dump Study from script
[modules/geom.git] / src / BlocksGUI / BlocksGUI_ExplodeDlg.cxx
index b58524ac68d23fc73eec6a101b71872b110af1d7..a03687eab5d8447a8cd9202e23c820e0a62f003a 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
@@ -163,6 +163,7 @@ void BlocksGUI_ExplodeDlg::ConstructorsClicked( int constructorId )
 //=================================================================================
 void BlocksGUI_ExplodeDlg::ClickOnOk()
 {
+  setIsApplyAndClose( true );
   if ( ClickOnApply() )
     ClickOnCancel();
 }
@@ -175,9 +176,9 @@ bool BlocksGUI_ExplodeDlg::ClickOnApply()
 {
   SUIT_Session::session()->activeApplication()->putInfo( tr( "" ) );
 
-  // Explode all sub shapes
+  // Explode all sub-shapes
   if ( isAllSubShapes() ) {
-    // More than 30 subshapes : ask confirmation
+    // More than 30 sub-shapes : ask confirmation
     if ( myNbBlocks > 30 ) {
       if ( SUIT_MessageBox::warning( this, 
                                      tr( "GEOM_CONFIRM" ),
@@ -278,7 +279,7 @@ void BlocksGUI_ExplodeDlg::ValueChangedInSpinBox()
 
 //=================================================================================
 // function : SubShapeToggled()
-// purpose  : Allow user selection of all or only selected sub shapes
+// purpose  : Allow user selection of all or only selected sub-shapes
 //          : Called when 'myGrp1->CheckBox1' state change
 //=================================================================================
 void BlocksGUI_ExplodeDlg::SubShapeToggled()
@@ -306,7 +307,7 @@ void BlocksGUI_ExplodeDlg::activateSelection()
              SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
   } 
   else {
-    displayPreview( true, true, false );
+    displayPreview( true, true, true, false );
     globalSelection( GEOM_PREVIEW );
   }
 }