From: jfa Date: Mon, 1 Aug 2005 12:16:27 +0000 (+0000) Subject: PAL9355: Bad names of sub-shapes after explode X-Git-Tag: T2_2_5a~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bfd83343c892711232723ba4b6f8487f781915ce;p=modules%2Fgeom.git PAL9355: Bad names of sub-shapes after explode --- diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 79b124723..3ae1dd7b5 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -1,23 +1,23 @@ // GEOM GEOMGUI : GUI for Geometry component // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -96,6 +96,8 @@ void EntityGUI_SubShapeDlg::Init() myEditCurrentArgument = GroupPoints->LineEdit1; myObject = GEOM::GEOM_Object::_nil(); + ResultName->setText(""); + myWithShape = true; /* type for sub shape selection */ @@ -125,7 +127,7 @@ void EntityGUI_SubShapeDlg::Init() connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged())); connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(SubShapeToggled())); - + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); updateButtonState(); @@ -152,7 +154,7 @@ void EntityGUI_SubShapeDlg::ClickOnOk() bool EntityGUI_SubShapeDlg::ClickOnApply() { QAD_Application::getDesktop()->putInfo(tr("")); - + /* Explode all sub shapes */ if( isAllSubShapes() ) { /* More than 30 subshapes : ask confirmation */ @@ -291,7 +293,7 @@ void EntityGUI_SubShapeDlg::SetEditCurrentArgument() { GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - + GroupPoints->CheckButton1->setChecked( FALSE ); SubShapeToggled(); SelectionIntoArgument(); @@ -303,7 +305,7 @@ void EntityGUI_SubShapeDlg::SetEditCurrentArgument() // purpose : //================================================================================= void EntityGUI_SubShapeDlg::LineEditReturnPressed() -{ +{ QLineEdit* send = (QLineEdit*)sender(); if(send == GroupPoints->LineEdit1) SetEditCurrentArgument(); @@ -376,9 +378,9 @@ void EntityGUI_SubShapeDlg::ResetStateOfDialog() GroupPoints->ComboBox1->insertItem("Edge"); GroupPoints->ComboBox1->insertItem("Vertex"); GroupPoints->ComboBox1->insertItem("Shape"); - + myWithShape = true; - + GroupPoints->ComboBox1->setCurrentItem( 8 - count + SelectedShapeType ); ComboTextChanged(); @@ -402,13 +404,13 @@ void EntityGUI_SubShapeDlg::SubShapeToggled() //================================================================================= // function : ComboTextChanged() -// purpose : +// purpose : //================================================================================= void EntityGUI_SubShapeDlg::ComboTextChanged() { /* Select sub shapes mode not checked */ updateButtonState(); - SubShapeToggled(); + SubShapeToggled(); } @@ -519,7 +521,7 @@ bool EntityGUI_SubShapeDlg::isValid( QString& msg ) Standard_Boolean aResult = Standard_False; GEOM::GEOM_Object_var anObj = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); - + if ( aResult && !anObj->_is_nil() ) { TColStd_IndexedMapOfInteger aMapIndex; mySelection->GetIndex( mySelection->firstIObject(), aMapIndex ); @@ -540,11 +542,11 @@ bool EntityGUI_SubShapeDlg::execute( ObjectList& objects ) { GEOM::ListOfGO_var aList = GEOM::GEOM_IShapesOperations::_narrow( getOperation() )->MakeExplode( myObject, shapeType(), false ); - + if ( !aList->length() ) return false; - - // Throw away sub-shapes not selected by user if not in preview mode + + // Throw away sub-shapes not selected by user if not in preview mode // and manual selection is active if ( !isAllSubShapes() ) { @@ -557,7 +559,7 @@ bool EntityGUI_SubShapeDlg::execute( ObjectList& objects ) TColStd_IndexedMapOfInteger aMapIndex; mySelection->GetIndex( mySelection->firstIObject(), aMapIndex ); - GEOM::GEOM_ILocalOperations_var aLocOp = + GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); for ( int i = 0, n = aList->length(); i < n; i++ ) @@ -569,7 +571,7 @@ bool EntityGUI_SubShapeDlg::execute( ObjectList& objects ) else for ( int i = 0, n = aList->length(); i < n; i++ ) objects.push_back( GEOM::GEOM_Object::_duplicate( aList[i] ) ); - + return objects.size(); } @@ -582,4 +584,3 @@ GEOM::GEOM_Object_ptr EntityGUI_SubShapeDlg::getFather( GEOM::GEOM_Object_ptr ) { return myObject; } -