-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_BuildCompoundDlg.cxx
// Author : Alexander KOVALEV, Open CASCADE S.A.S.
TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs);
TextLabelTol->setAlignment(Qt::AlignCenter);
SpinBoxTol = new SMESHGUI_SpinBox(GroupArgs);
- SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
+ SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision" );
GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
GroupArgsLayout->addWidget(SelectButton, 0, 1);
if (!isValid())
return false;
+ SMESH::SMESH_Mesh_var aCompoundMesh;
+
if (!myMesh->_is_nil()) {
QStringList aParameters;
aParameters << (CheckBoxMerge->isChecked() ? SpinBoxTol->text() : QString(" "));
- try {
+ try {
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
// concatenate meshes
- SMESH::SMESH_Mesh_var aCompoundMesh;
if(CheckBoxCommon->isChecked())
- aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
- !(ComboBoxUnion->currentIndex()),
- CheckBoxMerge->isChecked(),
- SpinBoxTol->GetValue());
+ aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
+ !(ComboBoxUnion->currentIndex()),
+ CheckBoxMerge->isChecked(),
+ SpinBoxTol->GetValue());
else
- aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
- !(ComboBoxUnion->currentIndex()),
- CheckBoxMerge->isChecked(),
- SpinBoxTol->GetValue());
+ aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
+ !(ComboBoxUnion->currentIndex()),
+ CheckBoxMerge->isChecked(),
+ SpinBoxTol->GetValue());
- aCompoundMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) );
+ aCompoundMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
mySMESHGUI->updateObjBrowser();
LineEditName->setText(GetDefaultName(tr("COMPOUND_MESH")));
- //mySelectionMgr->clearSelected();
- SMESH::UpdateView();
+ // IPAL21468 Compound is hidden after creation.
+ if ( SMESHGUI::automaticUpdate() ) {
+ mySelectionMgr->clearSelected();
+ SMESH::UpdateView();
+
+ _PTR(SObject) aSO = SMESH::FindSObject(aCompoundMesh.in());
+ if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) )
+ SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
+ }// end IPAL21468
+
return true;
}
return false;
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
else {
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
- tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser",
- "application")).
- arg(myHelpFileName));
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ "application")).
+ arg(myHelpFileName));
}
}