X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FRepairGUI%2FRepairGUI_SuppressFacesDlg.cxx;h=8186438fd107130b104ffa0433cbea2bc9e00937;hb=0b6826bc5f36b5420f41af1475e1a79371a25323;hp=7daaab8e1e1407a4c16ef01209d3940691e4be91;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index 7daaab8e1..8186438fd 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -106,7 +106,7 @@ void RepairGUI_SuppressFacesDlg::Init() //myGeomGUI->SetState( 0 ); initSelection(); - + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -115,9 +115,10 @@ void RepairGUI_SuppressFacesDlg::Init() connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "SUPRESS_FACE_NEW_OBJ_NAME" ) ); + resize(100,100); } @@ -178,19 +179,19 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument() if ( !CORBA::is_nil( aSelectedObject ) && aRes ) { TopoDS_Shape aShape; if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) ) { - if ( aShape.ShapeType() <= TopAbs_FACE ) { // FACE, SHELL, SOLID, COMPOUND - GEOM::short_array anIndexes; - - TColStd_IndexedMapOfInteger aMap; - aSelMgr->GetIndexes( anIO, aMap ); - - if ( !aMap.IsEmpty() ) { - Convert( aMap, anIndexes ); - myObjects[i++] = aSelectedObject; // append the object - myFaces.append( anIndexes ); // append faces' indexes - numFaces += anIndexes.length();// just for text field output - } - } + if ( aShape.ShapeType() <= TopAbs_FACE ) { // FACE, SHELL, SOLID, COMPOUND + GEOM::short_array anIndexes; + + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes( anIO, aMap ); + + if ( !aMap.IsEmpty() ) { + Convert( aMap, anIndexes ); + myObjects[i++] = aSelectedObject; // append the object + myFaces.append( anIndexes ); // append faces' indexes + numFaces += anIndexes.length();// just for text field output + } + } } } } @@ -246,7 +247,7 @@ void RepairGUI_SuppressFacesDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); //myGeomGUI->SetState( 0 ); initSelection(); @@ -294,7 +295,8 @@ bool RepairGUI_SuppressFacesDlg::execute( ObjectList& objects ) GEOM::GEOM_Object_var obj = myObjects[i]; GEOM::short_array faces = myFaces[i]; //MESSAGE(">>>> Dlg, passing faces.. len = " << faces.length()); - GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->SuppressFaces( obj, faces ); + GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() ); + GEOM::GEOM_Object_var anObj = anOper->SuppressFaces( obj, faces ); if ( anObj->_is_nil() ) anErrorObjNames << GEOMBase::GetName( obj ); else