Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Récupération d'un ménage trop rapide...
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_ShapeByMeshDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
index 5d82de8bebb4970fd87b28a13febf0ceba41d897..f761912cc21f08d0812252aca82d69752697b5e3 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
20
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-287,7
+287,7
@@
void SMESHGUI_ShapeByMeshOp::SetMesh (SMESH::SMESH_Mesh_ptr thePtr)
myHasSolids = nbShapes[ TopAbs_SOLID ];
}
myHasSolids = nbShapes[ TopAbs_SOLID ];
}
- // disable inexist
a
nt elem types
+ // disable inexist
e
nt elem types
for ( int i = 0; i < myDlg->myElemTypeGroup->buttons().count(); ++i ) {
if ( QAbstractButton* button = myDlg->myElemTypeGroup->button( i ) )
button->setEnabled( hasElement[ i ] );
for ( int i = 0; i < myDlg->myElemTypeGroup->buttons().count(); ++i ) {
if ( QAbstractButton* button = myDlg->myElemTypeGroup->button( i ) )
button->setEnabled( hasElement[ i ] );
@@
-314,18
+314,18
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
// GEOM_Object is published -> no need to UnRegister()
myGeomObj = GEOM::GEOM_Object::_duplicate
(SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
// GEOM_Object is published -> no need to UnRegister()
myGeomObj = GEOM::GEOM_Object::_duplicate
(SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
- ( myMesh.in(), elemID, myDlg->myGeomName->text().to
Latin1
().constData()) );
+ ( myMesh.in(), elemID, myDlg->myGeomName->text().to
Utf8
().constData()) );
}
else
{
}
else
{
- GEOM::GEOM_
Gen_var geomGen = SMESH::GetGEOMGen
();
+ GEOM::GEOM_
Object_var aMeshShape = myMesh->GetShapeToMesh
();
- if (geomGen->_is_nil())
+ GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen( aMeshShape );
+ if ( geomGen->_is_nil() )
return;
return;
- GEOM::GEOM_IShapesOperations_wrap aShapesOp =
- geomGen->GetIShapesOperations();
- if (aShapesOp->_is_nil() )
+ GEOM::GEOM_IShapesOperations_wrap aShapesOp = geomGen->GetIShapesOperations();
+ if ( aShapesOp->_is_nil() )
return;
TopAbs_ShapeEnum aGroupType = TopAbs_SHAPE;
return;
TopAbs_ShapeEnum aGroupType = TopAbs_SHAPE;
@@
-333,8
+333,6
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
std::map<int, GEOM::GEOM_Object_wrap> aGeomObjectsMap;
GEOM::GEOM_Object_wrap aGeomObject;
std::map<int, GEOM::GEOM_Object_wrap> aGeomObjectsMap;
GEOM::GEOM_Object_wrap aGeomObject;
- GEOM::GEOM_Object_var aMeshShape = myMesh->GetShapeToMesh();
-
for ( int i = 0; i < aListId.count(); i++ )
{
aGeomObject = // received object need UnRegister()!
for ( int i = 0; i < aListId.count(); i++ )
{
aGeomObject = // received object need UnRegister()!
@@
-362,9
+360,8
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
}
else if (aNumberOfGO > 1)
{
}
else if (aNumberOfGO > 1)
{
- GEOM::GEOM_IGroupOperations_wrap aGroupOp =
- geomGen->GetIGroupOperations();
- if(aGroupOp->_is_nil())
+ GEOM::GEOM_IGroupOperations_wrap aGroupOp = geomGen->GetIGroupOperations();
+ if ( aGroupOp->_is_nil() )
return;
GEOM::ListOfGO_var aGeomObjects = new GEOM::ListOfGO();
return;
GEOM::ListOfGO_var aGeomObjects = new GEOM::ListOfGO();
@@
-379,7
+376,7
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
aGeomObject = aGroupOp->CreateGroup(aMeshShape, aGroupType);
aGroupOp->UnionList(aGeomObject, aGeomObjects);
aGeomObject = aGroupOp->CreateGroup(aMeshShape, aGroupType);
aGroupOp->UnionList(aGeomObject, aGeomObjects);
- if (
!aGroupOp->IsDone()
)
+ if (
!aGroupOp->IsDone()
)
return;
}
return;
}
@@
-387,7
+384,7
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
QString aNewGeomGroupName ( myDlg->myGeomName->text() );
SALOMEDS::SObject_wrap aNewGroupSO =
geomGen->AddInStudy( aGeomObject,
QString aNewGeomGroupName ( myDlg->myGeomName->text() );
SALOMEDS::SObject_wrap aNewGroupSO =
geomGen->AddInStudy( aGeomObject,
- aNewGeomGroupName.to
Latin1
().data(), aMeshShape);
+ aNewGeomGroupName.to
Utf8
().data(), aMeshShape);
// get a GEOM_Object already published, which doesn't need UnRegister()
CORBA::Object_var obj = aNewGroupSO->GetObject();
// get a GEOM_Object already published, which doesn't need UnRegister()
CORBA::Object_var obj = aNewGroupSO->GetObject();
@@
-419,7
+416,7
@@
void SMESHGUI_ShapeByMeshOp::onSelectionDone()
try {
SALOME_ListIO aList;
selectionMgr()->selectedObjects(aList);
try {
SALOME_ListIO aList;
selectionMgr()->selectedObjects(aList);
- if (
!myIsMultipleAllowed && aList.Extent() != 1
)
+ if (
aList.IsEmpty() || ( !myIsMultipleAllowed && aList.Extent() != 1)
)
return;
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(aList.First());
return;
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(aList.First());
@@
-472,7
+469,7
@@
void SMESHGUI_ShapeByMeshOp::activateSelection()
//purpose : SLOT. Called when element type changed.
//=======================================================================
//purpose : SLOT. Called when element type changed.
//=======================================================================
-void SMESHGUI_ShapeByMeshOp::onTypeChanged (int
theType
)
+void SMESHGUI_ShapeByMeshOp::onTypeChanged (int
/*theType*/
)
{
setElementID("");
activateSelection();
{
setElementID("");
activateSelection();