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
Fix for #19201: Can't select a SHAPER result to create a group on geometry
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_GroupDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
index 62666c97ff45ceaf4d0d68f2668d3ecc28fd56c8..21b33c443b7e5022196c3a44633009fa7374f4a0 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
19
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
@@
-1063,7
+1063,7
@@
bool SMESHGUI_GroupDlg::onApply()
if (geomGen->_is_nil())
return false;
if (geomGen->_is_nil())
return false;
- GEOM::GEOM_IGroupOperations_
ptr
op = geomGen->GetIGroupOperations();
+ GEOM::GEOM_IGroupOperations_
wrap
op = geomGen->GetIGroupOperations();
if (op->_is_nil())
return false;
if (op->_is_nil())
return false;
@@
-1083,6
+1083,8
@@
bool SMESHGUI_GroupDlg::onApply()
GEOM::GEOM_Object_var aMeshShape = myMesh->GetShapeToMesh();
GEOM::GEOM_Object_wrap aGroupVar = op->CreateGroup(aMeshShape, aGroupType);
GEOM::GEOM_Object_var aMeshShape = myMesh->GetShapeToMesh();
GEOM::GEOM_Object_wrap aGroupVar = op->CreateGroup(aMeshShape, aGroupType);
+ if ( aGroupVar->_is_nil() )
+ return false;
op->UnionList(aGroupVar, myGeomObjects);
if (op->IsDone()) {
op->UnionList(aGroupVar, myGeomObjects);
if (op->IsDone()) {
@@
-1400,9
+1402,11
@@
void SMESHGUI_GroupDlg::onObjectSelectionChanged()
SALOME_ListIteratorOfListIO anIt (aList);
for (; anIt.More(); anIt.Next())
{
SALOME_ListIteratorOfListIO anIt (aList);
for (; anIt.More(); anIt.Next())
{
- aGeomGroup = GEOMBase::ConvertIOinGEOMObject(anIt.Value());
-
+ CORBA::Object_var aGroupObj = SMESH::IObjectToObject(anIt.Value());
+ if (CORBA::is_nil(aGroupObj))
+ continue;
// Check if the object is a geometry group
// Check if the object is a geometry group
+ aGeomGroup = GEOM::GEOM_Object::_narrow(aGroupObj);
if (CORBA::is_nil(aGeomGroup))
continue;
if (CORBA::is_nil(aGeomGroup))
continue;
@@
-1412,7
+1416,7
@@
void SMESHGUI_GroupDlg::onObjectSelectionChanged()
GEOM::GEOM_Object_var aGroupMainShape;
if (aGeomGroup->GetType() == 37)
{
GEOM::GEOM_Object_var aGroupMainShape;
if (aGeomGroup->GetType() == 37)
{
- GEOM::GEOM_IGroupOperations_
ptr
anOp =
+ GEOM::GEOM_IGroupOperations_
wrap
anOp =
SMESH::GetGEOMGen( aGeomGroup )->GetIGroupOperations();
aGroupMainShape = anOp->GetMainShape( aGeomGroup );
// aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
SMESH::GetGEOMGen( aGeomGroup )->GetIGroupOperations();
aGroupMainShape = anOp->GetMainShape( aGeomGroup );
// aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
@@
-2010,7
+2014,7
@@
void SMESHGUI_GroupDlg::onAdd()
}
else if ( myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1 )
{
}
else if ( myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1 )
{
- GEOM::GEOM_IGroupOperations_
ptr
aGroupOp =
+ GEOM::GEOM_IGroupOperations_
wrap
aGroupOp =
SMESH::GetGEOMGen( myGeomObjects[0] )->GetIGroupOperations();
SMESH::ElementType aGroupType = SMESH::ALL;
SMESH::GetGEOMGen( myGeomObjects[0] )->GetIGroupOperations();
SMESH::ElementType aGroupType = SMESH::ALL;