From a02de3dacca4bc2a799c16bf257111565e8b1b9f Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 11 Mar 2011 14:36:56 +0000 Subject: [PATCH] untabify --- src/SMESHGUI/SMESHGUI.cxx | 20 ++-- .../SMESHGUI_ExtrusionAlongPathDlg.cxx | 98 +++++++++---------- src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx | 14 +-- .../SMESHGUI_Preferences_ScalarBarDlg.cxx | 12 +-- src/SMESHGUI/SMESHGUI_RotationDlg.cxx | 20 ++-- src/SMESHGUI/SMESHGUI_ScaleDlg.cxx | 24 ++--- src/SMESHGUI/SMESHGUI_ScaleDlg.h | 2 +- src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx | 10 +- src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx | 12 +-- src/SMESHGUI/SMESHGUI_TranslationDlg.cxx | 34 +++---- src/SMESHGUI/SMESHGUI_VTKUtils.cxx | 44 ++++----- 11 files changed, 145 insertions(+), 145 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index a0f68f2fa..e7a950a1b 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1461,13 +1461,13 @@ std::string anEntry = SO->GetID(); /** Erase graphical object **/ - if(SO->FindAttribute(anAttr, "AttributeIOR")){ - ViewManagerList aViewMenegers = anApp->viewManagers(); - ViewManagerList::const_iterator it = aViewMenegers.begin(); - for( ; it != aViewMenegers.end(); it++) { - SUIT_ViewManager* vm = *it; - int nbSf = vm ? vm->getViewsCount() : 0; - if(vm) { + if(SO->FindAttribute(anAttr, "AttributeIOR")){ + ViewManagerList aViewMenegers = anApp->viewManagers(); + ViewManagerList::const_iterator it = aViewMenegers.begin(); + for( ; it != aViewMenegers.end(); it++) { + SUIT_ViewManager* vm = *it; + int nbSf = vm ? vm->getViewsCount() : 0; + if(vm) { QVector aViews = vm->getViews(); for(int i = 0; i < nbSf; i++){ SUIT_ViewWindow *sf = aViews[i]; @@ -1476,8 +1476,8 @@ } } } - } - } + } + } /** Remove an object from data structures **/ SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( SO )); SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( SO )); @@ -2879,7 +2879,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) for ( anIter->InitEx(true); anIter->More(); anIter->Next() ) { _PTR(SObject) so = anIter->Value(); - SMESH::RemoveVisualObjectWithActors(so->GetID().c_str(), true); + SMESH::RemoveVisualObjectWithActors(so->GetID().c_str(), true); } } catch (const SALOME::SALOME_Exception& S_ex){ diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index eb9a7aa37..be57b5569 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -1311,50 +1311,50 @@ void SMESHGUI_ExtrusionAlongPathDlg::onDisplaySimulation( bool toDisplayPreview // get base point SMESH::PointStruct aBasePoint; if (BasePointGrp->isChecked()) { - aBasePoint.x = XSpin->GetValue(); - aBasePoint.y = YSpin->GetValue(); - aBasePoint.z = ZSpin->GetValue(); + aBasePoint.x = XSpin->GetValue(); + aBasePoint.y = YSpin->GetValue(); + aBasePoint.z = ZSpin->GetValue(); } bool bOk; long aNodeStart = StartPointLineEdit->text().toLong(&bOk); if (bOk) { - - try { - SUIT_OverrideCursor wc; - - SMESH::SMESH_MeshEditor::Extrusion_Error retVal; - SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); - bool NeedGroups = false; - SMESH::ElementType ElemType = SMESH::FACE; - if( GetConstructorId() == 0 ) - ElemType = SMESH::EDGE; - if( !MeshCheck->isChecked() ) { - aMeshEditor->ExtrusionAlongPathX(anElementsId, myPath, aNodeStart, AnglesGrp->isChecked(), - anAngles, LinearAnglesCheck->isChecked(), - BasePointGrp->isChecked(), aBasePoint, - NeedGroups, ElemType, retVal); - } - else { - SMESH::ListOfGroups_var groups = - aMeshEditor->ExtrusionAlongPathObjX(myIDSource, myPath, aNodeStart, AnglesGrp->isChecked(), - anAngles, LinearAnglesCheck->isChecked(), - BasePointGrp->isChecked(), aBasePoint, - NeedGroups, ElemType, retVal); - } - - wc.suspend(); - if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK ) { - SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData(); - mySimulation->SetData(aMeshPreviewStruct._retn()); - } else { - hidePreview(); - } - - } catch (...) { - hidePreview(); - } + + try { + SUIT_OverrideCursor wc; + + SMESH::SMESH_MeshEditor::Extrusion_Error retVal; + SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); + bool NeedGroups = false; + SMESH::ElementType ElemType = SMESH::FACE; + if( GetConstructorId() == 0 ) + ElemType = SMESH::EDGE; + if( !MeshCheck->isChecked() ) { + aMeshEditor->ExtrusionAlongPathX(anElementsId, myPath, aNodeStart, AnglesGrp->isChecked(), + anAngles, LinearAnglesCheck->isChecked(), + BasePointGrp->isChecked(), aBasePoint, + NeedGroups, ElemType, retVal); + } + else { + SMESH::ListOfGroups_var groups = + aMeshEditor->ExtrusionAlongPathObjX(myIDSource, myPath, aNodeStart, AnglesGrp->isChecked(), + anAngles, LinearAnglesCheck->isChecked(), + BasePointGrp->isChecked(), aBasePoint, + NeedGroups, ElemType, retVal); + } + + wc.suspend(); + if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK ) { + SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData(); + mySimulation->SetData(aMeshPreviewStruct._retn()); + } else { + hidePreview(); + } + + } catch (...) { + hidePreview(); + } } else { - hidePreview(); + hidePreview(); } } else { @@ -1388,16 +1388,16 @@ SMESH::long_array_var SMESHGUI_ExtrusionAlongPathDlg::getSelectedElements() { bool bOk; int j = 0; for (int i = 0; i < aListElementsId.count(); i++) { - long ind = aListElementsId[ i ].toLong(&bOk); - if (bOk) { - const SMDS_MeshElement* e = aMesh->FindElement(ind); - if (e) { - bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge || - Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face; - if (typeMatch) - anElementsId[ j++ ] = ind; - } - } + long ind = aListElementsId[ i ].toLong(&bOk); + if (bOk) { + const SMDS_MeshElement* e = aMesh->FindElement(ind); + if (e) { + bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge || + Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face; + if (typeMatch) + anElementsId[ j++ ] = ind; + } + } } anElementsId->length(j); } diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 0a8256bbe..514615a3f 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -1069,8 +1069,8 @@ void SMESHGUI_ExtrusionDlg::onDisplaySimulation( bool toDisplayPreview ) { long aNbSteps = (long)SpinBox_NbSteps->value(); try { - SUIT_OverrideCursor aWaitCursor; - SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); + SUIT_OverrideCursor aWaitCursor; + SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); if( CheckBoxMesh->isChecked() ) { if( GetConstructorId() == 0 ) aMeshEditor->ExtrusionSweepObject1D(mySelectedObject, aVector, aNbSteps); @@ -1079,11 +1079,11 @@ void SMESHGUI_ExtrusionDlg::onDisplaySimulation( bool toDisplayPreview ) { } else aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps); - + SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData(); mySimulation->SetData(aMeshPreviewStruct._retn()); } catch (...) { - hidePreview(); + hidePreview(); } } else { hidePreview(); @@ -1101,11 +1101,11 @@ void SMESHGUI_ExtrusionDlg::getExtrusionVector(SMESH::DirStruct& aVector) { if ( RadioButton3->isChecked() ) { aVector.PS.x = SpinBox_Dx->GetValue(); aVector.PS.y = SpinBox_Dy->GetValue(); - aVector.PS.z = SpinBox_Dz->GetValue(); + aVector.PS.z = SpinBox_Dz->GetValue(); } else if ( RadioButton4->isChecked() ) { gp_XYZ aNormale(SpinBox_Vx->GetValue(), - SpinBox_Vy->GetValue(), - SpinBox_Vz->GetValue()); + SpinBox_Vy->GetValue(), + SpinBox_Vz->GetValue()); aNormale /= aNormale.Modulus(); diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx index 57d2fc16c..808f3f182 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx @@ -540,7 +540,7 @@ bool SMESHGUI_Preferences_ScalarBarDlg::onApply() myScalarBarActor->GetDistributionColor(oldRgb); colorChanged = (rgb[0] != oldRgb[0] || rgb[1] != oldRgb[1] || rgb[2] != oldRgb[2]); if(colorChanged) - myScalarBarActor->SetDistributionColor(rgb); + myScalarBarActor->SetDistributionColor(rgb); } } @@ -682,15 +682,15 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged() myMonoColorBtn->setColor( QColor( (int)( aTColor[0]*255 ), (int)( aTColor[1]*255 ), (int)( aTColor[2]*255 ) ) ); if ( coloringType == SMESH_MONOCOLOR_TYPE ) { myDMonoColor->setChecked(true); - onDistributionChanged(myDistribColorGrp->id(myDMonoColor)); + onDistributionChanged(myDistribColorGrp->id(myDMonoColor)); } else { myDMultiColor->setChecked(true); onDistributionChanged(myDistribColorGrp->id(myDMultiColor)); } myDistributionGrp->setChecked((bool)myScalarBarActor->GetDistributionVisibility()); - onDistributionActivated(myScalarBarActor->GetDistributionVisibility()); - - + onDistributionActivated(myScalarBarActor->GetDistributionVisibility()); + + myRangeGrp->setEnabled( true ); myFontGrp->setEnabled( true ); myLabColorGrp->setEnabled( true ); @@ -698,7 +698,7 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged() myOriginDimGrp->setEnabled( true ); myOkBtn->setEnabled( true ); myApplyBtn->setEnabled( true ); - myDistributionGrp->setEnabled( true ); + myDistributionGrp->setEnabled( true ); return; } } diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index d13cabbf1..5daf12be1 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -1069,7 +1069,7 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) { anElementsId->length(aListElementsId.count()); for (int i = 0; i < aListElementsId.count(); i++) - anElementsId[i] = aListElementsId[i].toInt(); + anElementsId[i] = aListElementsId[i].toInt(); SMESH::AxisStruct anAxis; @@ -1082,18 +1082,18 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) { double anAngle = (SpinBox_Angle->GetValue())*PI/180; try { - SUIT_OverrideCursor aWaitCursor; - bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; - SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); - if(CheckBoxMesh->isChecked()) - aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, copy); - else - aMeshEditor->Rotate(anElementsId, anAxis, anAngle, copy); + SUIT_OverrideCursor aWaitCursor; + bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; + SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); + if(CheckBoxMesh->isChecked()) + aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, copy); + else + aMeshEditor->Rotate(anElementsId, anAxis, anAngle, copy); SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData(); - mySimulation->SetData(aMeshPreviewStruct._retn()); + mySimulation->SetData(aMeshPreviewStruct._retn()); } catch (...) { - hidePreview(); + hidePreview(); } } else { diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx index 7a8dcb442..b22b1f52a 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx @@ -1076,28 +1076,28 @@ void SMESHGUI_ScaleDlg::onDisplaySimulation( bool toDisplayPreview ) { anElementsId->length(aListElementsId.count()); for (int i = 0; i < aListElementsId.count(); i++) - anElementsId[i] = aListElementsId[i].toInt(); + anElementsId[i] = aListElementsId[i].toInt(); SMESH::PointStruct aPoint; SMESH::double_array_var aScaleFact = new SMESH::double_array; getScale(aPoint, aScaleFact); try { - bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; - SUIT_OverrideCursor aWaitCursor; - SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); - SMESH::SMESH_IDSource_var obj; - if ( CheckBoxMesh->isChecked() ) - obj = mySelectedObject; - else - obj = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL); - aMeshEditor->Scale(obj, aPoint, aScaleFact, copy); + bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; + SUIT_OverrideCursor aWaitCursor; + SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); + SMESH::SMESH_IDSource_var obj; + if ( CheckBoxMesh->isChecked() ) + obj = mySelectedObject; + else + obj = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL); + aMeshEditor->Scale(obj, aPoint, aScaleFact, copy); SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData(); - mySimulation->SetData(aMeshPreviewStruct._retn()); + mySimulation->SetData(aMeshPreviewStruct._retn()); } catch (...) { - hidePreview(); + hidePreview(); } } else { hidePreview(); diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.h b/src/SMESHGUI/SMESHGUI_ScaleDlg.h index be405ffa8..359becacd 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.h +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.h @@ -71,7 +71,7 @@ private: bool isValid(); void getScale( SMESH::PointStruct& thePoint, - SMESH::double_array_var& theScaleFact); + SMESH::double_array_var& theScaleFact); SMESHGUI_IdValidator* myIdValidator; LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index 80dd7ea97..fe4725636 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -499,9 +499,9 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText) for (int i = 0; i < aListId.count(); i++) { int id = aListId[ i ].toInt(); if ( id > 0 ) { - bool validId = aMesh ? ( aMesh->FindElement( id ) != 0 ) : ( myMesh->GetElementType( id, true ) != SMESH::EDGE ); + bool validId = aMesh ? ( aMesh->FindElement( id ) != 0 ) : ( myMesh->GetElementType( id, true ) != SMESH::EDGE ); if ( validId ) - newIndices.Add( id ); + newIndices.Add( id ); } myNbOkElements = newIndices.Extent(); mySelector->AddOrRemoveIndex(myIO, newIndices, false); @@ -514,9 +514,9 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText) for (int i = 0; i < aListId.count(); i++) { int id = aListId[ i ].toInt(); if ( id > 0 ) { - bool validId = aMesh ? ( aMesh->FindNode( id ) != 0 ) : ( myMesh->GetElementType( id, false ) != SMESH::EDGE ); + bool validId = aMesh ? ( aMesh->FindNode( id ) != 0 ) : ( myMesh->GetElementType( id, false ) != SMESH::EDGE ); if ( validId ) - newIndices.Add( id ); + newIndices.Add( id ); } myNbOkNodes = newIndices.Extent(); mySelector->AddOrRemoveIndex(myIO, newIndices, false); @@ -599,7 +599,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument() QStringList elements; for ( int i = 0; i < myNbOkElements; ++i ) - elements << QString::number( aMapIndex( i+1 ) ); + elements << QString::number( aMapIndex( i+1 ) ); aString = elements.join(" "); } } else if (myEditCurrentArgument == LineEditNodes && !myMesh->_is_nil() && myIO == IO ) { diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index 9d73fc6c4..986416d14 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -1146,7 +1146,7 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) { anElementsId->length(aListElementsId.count()); for (int i = 0; i < aListElementsId.count(); i++) - anElementsId[i] = aListElementsId[i].toInt(); + anElementsId[i] = aListElementsId[i].toInt(); SMESH::AxisStruct aMirror; SMESH::SMESH_MeshEditor::MirrorType aMirrorType; @@ -1154,18 +1154,18 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) { getMirror(aMirror,aMirrorType); try { - bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; - SUIT_OverrideCursor aWaitCursor; - SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); + bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; + SUIT_OverrideCursor aWaitCursor; + SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); if(CheckBoxMesh->isChecked()) aMeshEditor->MirrorObject(mySelectedObject, aMirror, aMirrorType, copy ); else aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, copy ); - + SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData(); mySimulation->SetData(aMeshPreviewStruct._retn()); } catch (...) { - hidePreview(); + hidePreview(); } } else { hidePreview(); diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index 4ceb446a9..5ec665216 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -1118,32 +1118,32 @@ void SMESHGUI_TranslationDlg::onDisplaySimulation( bool toDisplayPreview ) { anElementsId->length(aListElementsId.count()); for (int i = 0; i < aListElementsId.count(); i++) - anElementsId[i] = aListElementsId[i].toInt(); + anElementsId[i] = aListElementsId[i].toInt(); SMESH::DirStruct aVector; if (GetConstructorId() == 0) { - aVector.PS.x = SpinBox2_1->GetValue() - SpinBox1_1->GetValue(); - aVector.PS.y = SpinBox2_2->GetValue() - SpinBox1_2->GetValue(); - aVector.PS.z = SpinBox2_3->GetValue() - SpinBox1_3->GetValue(); + aVector.PS.x = SpinBox2_1->GetValue() - SpinBox1_1->GetValue(); + aVector.PS.y = SpinBox2_2->GetValue() - SpinBox1_2->GetValue(); + aVector.PS.z = SpinBox2_3->GetValue() - SpinBox1_3->GetValue(); } else if (GetConstructorId() == 1) { - aVector.PS.x = SpinBox1_1->GetValue(); - aVector.PS.y = SpinBox1_2->GetValue(); - aVector.PS.z = SpinBox1_3->GetValue(); + aVector.PS.x = SpinBox1_1->GetValue(); + aVector.PS.y = SpinBox1_2->GetValue(); + aVector.PS.z = SpinBox1_3->GetValue(); } try { - bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; - SUIT_OverrideCursor aWaitCursor; - SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); - if(CheckBoxMesh->isChecked()) - aMeshEditor->TranslateObject(mySelectedObject, aVector, copy); - else - aMeshEditor->Translate(anElementsId, aVector, copy); - + bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; + SUIT_OverrideCursor aWaitCursor; + SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); + if(CheckBoxMesh->isChecked()) + aMeshEditor->TranslateObject(mySelectedObject, aVector, copy); + else + aMeshEditor->Translate(anElementsId, aVector, copy); + SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData(); - mySimulation->SetData(aMeshPreviewStruct._retn()); + mySimulation->SetData(aMeshPreviewStruct._retn()); } catch (...) { - + } } else { diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 76a3019cf..40a80cc23 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -118,7 +118,7 @@ namespace SMESH } else { SUIT_ViewManager* aVM = app->getViewManager(SVTK_Viewer::Type(), true); if(aVM) - aList.append(aVM); + aList.append(aVM); } bool actorRemoved = false; ViewManagerList::ConstIterator it = aList.begin(); @@ -127,13 +127,13 @@ namespace SMESH aViewManager = *it; QVector views = aViewManager->getViews(); for ( int iV = 0; iV < views.count(); ++iV ) { - if ( SMESH_Actor* actor = FindActorByEntry( views[iV], theEntry)) { - if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) { - vtkWnd->RemoveActor(actor); - actorRemoved = true; - } - actor->Delete(); - } + if ( SMESH_Actor* actor = FindActorByEntry( views[iV], theEntry)) { + if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) { + vtkWnd->RemoveActor(actor); + actorRemoved = true; + } + actor->Delete(); + } } } @@ -142,9 +142,9 @@ namespace SMESH TVisualObjCont::key_type aKey(aStudyId,theEntry); TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey); if(anIter != VISUAL_OBJ_CONT.end()) { - // for unknown reason, object destructor is not called, so clear object manually - anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0); - anIter->second->GetUnstructuredGrid()->SetPoints(0); + // for unknown reason, object destructor is not called, so clear object manually + anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0); + anIter->second->GetUnstructuredGrid()->SetPoints(0); } VISUAL_OBJ_CONT.erase(aKey); } @@ -732,12 +732,12 @@ namespace SMESH MESSAGE("--- display " << anActor); anActor->SetVisibility(true); - if(anActor->hasIO()){ - Handle(SALOME_InteractiveObject) anIO = anActor->getIO(); - if(anIO->hasEntry()){ - aStudy->setVisibilityState(anIO->getEntry(), Qtx::ShownState); - } - } + if(anActor->hasIO()){ + Handle(SALOME_InteractiveObject) anIO = anActor->getIO(); + if(anIO->hasEntry()){ + aStudy->setVisibilityState(anIO->getEntry(), Qtx::ShownState); + } + } } } break; @@ -751,7 +751,7 @@ namespace SMESH anActor->SetVisibility(false); } } - aStudy->setVisibilityStateForAll(Qtx::HiddenState); + aStudy->setVisibilityStateForAll(Qtx::HiddenState); } default: { if (SMESH_Actor *anActor = FindActorByEntry(theWnd,theEntry)) { @@ -759,15 +759,15 @@ namespace SMESH case eDisplay: case eDisplayOnly: //MESSAGE("--- display " << anActor); - anActor->Update(); + anActor->Update(); anActor->SetVisibility(true); if (theAction == eDisplayOnly) aRenderer->ResetCameraClippingRange(); - aStudy->setVisibilityState(theEntry, Qtx::ShownState); + aStudy->setVisibilityState(theEntry, Qtx::ShownState); break; case eErase: //MESSAGE("--- erase " << anActor); anActor->SetVisibility(false); - aStudy->setVisibilityState(theEntry, Qtx::HiddenState); + aStudy->setVisibilityState(theEntry, Qtx::HiddenState); break; } } else { @@ -786,7 +786,7 @@ namespace SMESH if ((anActor = CreateActor(aDocument,theEntry,true))) { bool needFitAll = noSmeshActors(theWnd); // fit for the first object only DisplayActor(theWnd,anActor); - aStudy->setVisibilityState(theEntry, Qtx::ShownState); + aStudy->setVisibilityState(theEntry, Qtx::ShownState); // FitAll(); - PAL16770(Display of a group performs an automatic fit all) if (needFitAll) FitAll(); } else {