X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_BuildCompoundDlg.cxx;h=ae1f5ad3f371312ded0de3e7b2193d2764268696;hp=9b440ea5f829abfbfe5d27165e49c2a26304a28b;hb=387ee093834ff8105e02cf017f0823d09c0412f9;hpb=251f8c052dd12dd29922210dc901b295fe999a0e diff --git a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx index 9b440ea5f..ae1f5ad3f 100644 --- a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx @@ -200,11 +200,11 @@ void SMESHGUI_BuildCompoundDlg::Init() { mySMESHGUI->SetActiveDialogBox((QDialog*)this); - myMesh = SMESH::SMESH_Mesh::_nil(); + myMesh = SMESH::SMESH_IDSource::_nil(); - myMeshFilter = new SMESH_TypeFilter (SMESH::MESH); + myMeshFilter = new SMESH_TypeFilter (SMESH::IDSOURCE); - myMeshArray = new SMESH::mesh_array(); + myMeshArray = new SMESH::ListOfIDSources(); // signals and slots connections connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -228,7 +228,7 @@ void SMESHGUI_BuildCompoundDlg::Init() ComboBoxUnion->addItem(tr("RENAME")); ComboBoxUnion->setCurrentIndex(0); - CheckBoxMerge->setChecked(false); + CheckBoxMerge->setChecked(true); TextLabelTol->setEnabled(CheckBoxMerge->isChecked()); SpinBoxTol->SetValue(1e-05); @@ -289,7 +289,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply() if (!isValid()) return false; - SMESH::SMESH_Mesh_var aCompoundMesh; + SMESH::SMESH_Mesh_var aMesh; if (!myMesh->_is_nil()) { @@ -300,22 +300,23 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply() try { SUIT_OverrideCursor aWaitCursor; - myMeshArray[0]->SetParameters( aParameters.join(":").toLatin1().constData() ); + aMesh = myMeshArray[0]->GetMesh(); + aMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen(); // concatenate meshes if(CheckBoxCommon->isChecked()) - aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray, - !(ComboBoxUnion->currentIndex()), - CheckBoxMerge->isChecked(), - SpinBoxTol->GetValue()); + aMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray, + !(ComboBoxUnion->currentIndex()), + CheckBoxMerge->isChecked(), + SpinBoxTol->GetValue()); else - aCompoundMesh = aSMESHGen->Concatenate(myMeshArray, - !(ComboBoxUnion->currentIndex()), - CheckBoxMerge->isChecked(), - SpinBoxTol->GetValue()); + aMesh = aSMESHGen->Concatenate(myMeshArray, + !(ComboBoxUnion->currentIndex()), + CheckBoxMerge->isChecked(), + SpinBoxTol->GetValue()); - _PTR(SObject) aSO = SMESH::FindSObject( aCompoundMesh ); + _PTR(SObject) aSO = SMESH::FindSObject( aMesh ); if( aSO ) { SMESH::SetName( aSO, LineEditName->text() ); anEntryList.append( aSO->GetID().c_str() ); @@ -332,7 +333,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply() mySelectionMgr->clearSelected(); SMESH::UpdateView(); - _PTR(SObject) aSO = SMESH::FindSObject(aCompoundMesh.in()); + _PTR(SObject) aSO = SMESH::FindSObject(aMesh.in()); if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) ) { SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor); SMESH::UpdateView(); @@ -412,12 +413,12 @@ void SMESHGUI_BuildCompoundDlg::SelectionIntoArgument() for (int i = 0; nbSel != 0; i++, nbSel--) { Handle(SALOME_InteractiveObject) IO = aList.First(); aList.RemoveFirst(); - myMesh = SMESH::IObjectToInterface(IO); + myMesh = SMESH::IObjectToInterface(IO); myMeshArray[i] = myMesh; } } else { - myMesh = SMESH::SMESH_Mesh::_nil(); + myMesh = SMESH::SMESH_IDSource::_nil(); aString = ""; }