-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
TopoDS_Shape aMainShape = GEOM_Client::get_client().GetShape(GeometryGUI::GetGeomGen(), myObject);
TopExp::MapShapes(aMainShape, aMainMap);
+ SALOME_ListIO aSelListToShow;
SALOME_ListIteratorOfListIO anIter (aSelList);
for (int i = 0; anIter.More(); anIter.Next(), i++) {
Handle(SALOME_InteractiveObject) anIO = anIter.Value();
QString anEntry = anIO->getEntry();
- _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData()));
+ _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData()));
+ if ( ! GeometryGUI::IsInGeomComponent( aSObj )) continue;
GEOM::GEOM_Object_var aGeomObj =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj));
TopoDS_Shape aShape;
if (GEOMBase::GetShape(aGeomObj, aShape)) {
if (aGeomObj->GetType() == GEOM_GROUP || aShape.ShapeType() == TopAbs_FACE) {
TopExp_Explorer anExp (aShape, TopAbs_FACE);
+ bool isInside = false;
for (; anExp.More(); anExp.Next()) {
TopoDS_Shape aSubShape = anExp.Current();
int anIndex = aMainMap.FindIndex(aSubShape);
- if (anIndex >= 0) {
+ if (anIndex > 0) {
aMap.Add(anIndex);
anIds.Add(anIndex);
+ isInside = true;
+ aSelListToShow.Append(anIO);
}
}
+ if (!isInside)
+ {
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+ aSelMgr->AddOrRemoveIndex(anIO, anIds, false);
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
+ }
}
}
}
+
if (!aMap.IsEmpty()) {
// highlight local faces, correspondent to OB selection
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
aSelMgr->AddOrRemoveIndex(aSh->getIO(), anIds, false);
+ SALOME_ListIteratorOfListIO anIter(aSelListToShow);
+ for (; anIter.More(); anIter.Next()) {
+ aSelMgr->AddOrRemoveIndex(anIter.Value(), anIds, false);
+ }
+
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
}
//=================================================================================
GEOM::GEOM_IOperations_ptr RepairGUI_SuppressFacesDlg::createOperation()
{
- return getGeomEngine()->GetIHealingOperations(getStudyId());
+ return getGeomEngine()->GetIHealingOperations();
}
//=================================================================================
// function : restoreSubShapes
// purpose :
//=================================================================================
-void RepairGUI_SuppressFacesDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_SuppressFacesDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
{
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
/*theFindMethod=*/GEOM::FSM_GetInPlace,
/*theInheritFirstArg=*/true,
mainFrame()->CheckBoxAddPrefix->isChecked());