Fix for bug IPAL19810(Qt4 porting: Modification - Smoothing after operation cursor remains to be "watches").

This commit is contained in:
mzn 2008-06-03 11:47:27 +00:00
parent 385b46d935
commit 6c3c99ea8d
11 changed files with 29 additions and 32 deletions

View File

@ -39,6 +39,8 @@
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
#include <SalomeApp_Study.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <SALOME_ListIO.hxx>
@ -281,7 +283,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
return false;
if (!myMesh->_is_nil()) {
try {
QApplication::setOverrideCursor(Qt::WaitCursor);
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
// concatenate meshes
@ -292,7 +294,6 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
SpinBoxTol->GetValue());
SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
QApplication::restoreOverrideCursor();
mySMESHGUI->updateObjBrowser();
} catch(...) {
return false;

View 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>
@ -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){

View File

@ -42,6 +42,7 @@
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -581,10 +582,9 @@ bool SMESHGUI_EditMeshDlg::ClickOnApply()
return false;
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
SMESH::long_array_var anIds = new SMESH::long_array;
SMESH::array_of_long_array_var aGroupsOfElements = new SMESH::array_of_long_array;
@ -606,7 +606,6 @@ bool SMESHGUI_EditMeshDlg::ClickOnApply()
else
aMeshEditor->MergeElements (aGroupsOfElements.inout());
QApplication::restoreOverrideCursor();
} catch(...) {
}
@ -712,9 +711,9 @@ void SMESHGUI_EditMeshDlg::onDetect()
return;
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
ListCoincident->clear();
ListEdit->clear();
@ -744,7 +743,6 @@ void SMESHGUI_EditMeshDlg::onDetect()
ListCoincident->addItem(anIDs.join(" "));
}
QApplication::restoreOverrideCursor();
} catch(...) {
}

View File

@ -44,6 +44,7 @@
#include <SUIT_Desktop.h>
#include <SUIT_MessageBox.h>
#include <SUIT_Session.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -368,8 +369,8 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
long aNbSteps = (long)SpinBox_NbSteps->value();
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
SMESH::ListOfGroups_var groups =
@ -377,7 +378,6 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
else
aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps);
QApplication::restoreOverrideCursor();
} catch (...) {
}

View File

@ -38,6 +38,7 @@
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_MessageBox.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -226,7 +227,7 @@ void SMESHGUI_RenumberingDlg::ClickOnApply()
if (isUnitsLabeled) anActor->SetCellsLabeled(false);
}
QApplication::setOverrideCursor(Qt::WaitCursor);
SUIT_OverrideCursor aWaitCursor;
if (myUnit == 0) {
aMeshEditor->RenumberNodes();
if (isUnitsLabeled && anActor) anActor->SetPointsLabeled(true);
@ -235,7 +236,6 @@ void SMESHGUI_RenumberingDlg::ClickOnApply()
aMeshEditor->RenumberElements();
if (isUnitsLabeled && anActor) anActor->SetCellsLabeled(true);
}
QApplication::restoreOverrideCursor();
}
catch(...) {
}

View File

@ -43,6 +43,7 @@
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
#include <SUIT_Desktop.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -423,8 +424,8 @@ void SMESHGUI_RevolutionDlg::ClickOnApply()
double aTolerance = SpinBox_Tolerance->GetValue();
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
SMESH::ListOfGroups_var groups =
@ -432,8 +433,6 @@ void SMESHGUI_RevolutionDlg::ClickOnApply()
anAngle, aNbSteps, aTolerance);
else
aMeshEditor->RotationSweep(anElementsId.inout(), anAxis, anAngle, aNbSteps, aTolerance);
QApplication::restoreOverrideCursor();
} catch (...) {
}

View File

@ -43,6 +43,7 @@
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -381,8 +382,8 @@ void SMESHGUI_RotationDlg::ClickOnApply()
int actionButton = ActionGroup->checkedId();
bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
switch ( actionButton ) {
case MOVE_ELEMS_BUTTON:
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
@ -399,7 +400,6 @@ void SMESHGUI_RotationDlg::ClickOnApply()
aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
LineEditNewMesh->text().toLatin1().data());
}
QApplication::restoreOverrideCursor();
} catch (...) {
}

View File

@ -40,6 +40,7 @@
#include <SUIT_ResourceMgr.h>
#include <SUIT_Desktop.h>
#include <SUIT_MessageBox.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -458,8 +459,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
bool toCreatePolyedrs = CheckBoxPolyedrs->isChecked();
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
int aConstructorId = GetConstructorId();
SMESH::SMESH_MeshEditor::Sew_Error anError;
@ -514,8 +515,6 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
if (toMerge && aResult)
aMeshEditor->MergeEqualElements();
QApplication::restoreOverrideCursor();
if (!aResult) {
QString msg = tr(QString("ERROR_%1").arg(anError).toLatin1().data());
SUIT_MessageBox::warning(this, tr("SMESH_WRN_WARNING"), msg);

View File

@ -340,15 +340,15 @@ void SMESHGUI_SmoothingDlg::ClickOnApply()
bool aResult = false;
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
if ( CheckBoxParametric->isChecked() )
aResult = aMeshEditor->SmoothParametric(anElementsId.inout(), aNodesId.inout(),
anIterationLimit, aMaxAspectRatio, aMethod);
else
aResult = aMeshEditor->Smooth(anElementsId.inout(), aNodesId.inout(),
anIterationLimit, aMaxAspectRatio, aMethod);
QApplication::restoreOverrideCursor();
} catch (...) {
}

View File

@ -43,6 +43,7 @@
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -468,8 +469,9 @@ void SMESHGUI_SymmetryDlg::ClickOnApply()
bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
switch ( actionButton ) {
case MOVE_ELEMS_BUTTON:
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
@ -486,7 +488,6 @@ void SMESHGUI_SymmetryDlg::ClickOnApply()
aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
LineEditNewMesh->text().toLatin1().data());
}
QApplication::restoreOverrideCursor();
} catch (...) {
}

View File

@ -43,6 +43,7 @@
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -436,8 +437,8 @@ void SMESHGUI_TranslationDlg::ClickOnApply()
int actionButton = ActionGroup->checkedId();
bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
QApplication::setOverrideCursor(Qt::WaitCursor);
switch ( actionButton ) {
case MOVE_ELEMS_BUTTON:
aMeshEditor->Translate(anElementsId, aVector, false);
@ -454,7 +455,6 @@ void SMESHGUI_TranslationDlg::ClickOnApply()
aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
LineEditNewMesh->text().toLatin1().data());
}
QApplication::restoreOverrideCursor();
} catch (...) {
}