X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FRepairGUI%2FRepairGUI_SuppressFacesDlg.cxx;h=87094bd1ddcdc1ba9aa02987af995d6c31f72d9f;hb=b6f0965afb72083a5234f9b4fb0b233adaaf8d9d;hp=43a0f629eba0ceea275b69078972bc432345d1a7;hpb=6f000dfe28cad33bcf7053913e1a2f24b3fa3e33;p=modules%2Fgeom.git diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index 43a0f629e..87094bd1d 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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 @@ -24,9 +24,10 @@ #include "RepairGUI_SuppressFacesDlg.h" -#include -#include -#include +#include "DlgRef.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" +#include "RepairGUI.h" #include #include @@ -222,7 +223,8 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument() 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; @@ -351,7 +353,7 @@ void RepairGUI_SuppressFacesDlg::enterEvent (QEvent*) //================================================================================= GEOM::GEOM_IOperations_ptr RepairGUI_SuppressFacesDlg::createOperation() { - return getGeomEngine()->GetIHealingOperations(getStudyId()); + return getGeomEngine()->GetIHealingOperations(); } //================================================================================= @@ -376,8 +378,11 @@ bool RepairGUI_SuppressFacesDlg::execute (ObjectList& objects) bool aResult = !anObj->_is_nil(); if (aResult) + { + if ( !IsPreview() ) + RepairGUI::ShowStatistics( anOper, this ); objects.push_back(anObj._retn()); - + } return aResult; } @@ -410,14 +415,25 @@ void RepairGUI_SuppressFacesDlg::initSelection() // 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()); } } + +//================================================================================= +// function : getSourceObjects +// purpose : virtual method to get source objects +//================================================================================= +QList RepairGUI_SuppressFacesDlg::getSourceObjects() +{ + QList res; + GEOM::GeomObjPtr aGeomObjPtr(myObject); + res << aGeomObjPtr; + return res; +}