Salome HOME
Merge from V4_1_0_maintainance branch (from tag mergeto_BR_QT4_Dev_08Jul08)
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_CreatePolyhedralVolumeDlg.cxx
index c3f65fdc2291dc26fc7c63ad189ca99623e6670b..687c9da09fe8d4f3ee276f6b1075039a3f2f8dbb 100644 (file)
@@ -42,6 +42,7 @@
 #include <SUIT_Session.h>
 #include <SUIT_MessageBox.h>
 #include <SUIT_ViewManager.h>
+#include <SUIT_OverrideCursor.h>
 
 #include <SalomeApp_Application.h>
 #include <LightApp_SelectionMgr.h>
@@ -251,7 +252,7 @@ SMESHGUI_CreatePolyhedralVolumeDlg::SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI
   GroupButtonsLayout->setSpacing( SPACING );
   GroupButtonsLayout->setMargin( MARGIN );
 
-  buttonOk = new QPushButton( tr( "SMESH_BUT_OK" ), GroupButtons );
+  buttonOk = new QPushButton( tr( "SMESH_BUT_APPLY_AND_CLOSE" ), GroupButtons );
   buttonOk->setAutoDefault( true );
   buttonOk->setDefault( true );
   buttonApply = new QPushButton( tr( "SMESH_BUT_APPLY" ), GroupButtons );
@@ -450,10 +451,9 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
            anIdsOfNodes[aNbIdsOfNodes++] = It.Value();
            
          try{
+           SUIT_OverrideCursor aWaitCursor;
            SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
-           QApplication::setOverrideCursor(Qt::WaitCursor);
            aMeshEditor->AddPolyhedralVolume(anIdsOfNodes, aQuantities);
-           QApplication::restoreOverrideCursor();
          }catch(SALOME::SALOME_Exception& exc){
            INFOS("Follow exception was cought:\n\t"<<exc.details.text);
          }catch(std::exception& exc){
@@ -472,10 +472,9 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
            anIdsOfFaces[i] = aListId[i].toInt();
          
          try{
+           SUIT_OverrideCursor aWaitCursor;
            SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
-           QApplication::setOverrideCursor(Qt::WaitCursor);
            aMeshEditor->AddPolyhedralVolumeByFaces(anIdsOfFaces);
-           QApplication::restoreOverrideCursor();
          }catch(SALOME::SALOME_Exception& exc){
            INFOS("Follow exception was cought:\n\t"<<exc.details.text);
          }catch(std::exception& exc){