From: dmv Date: Mon, 19 May 2008 06:58:42 +0000 (+0000) Subject: IPAL19241 REGR: Incorrect message on Explode if Point is selected as Main Object. X-Git-Tag: V4_1_3rc1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cd6d281a959d4344c0e6bc7ab22ab73922f901bf;p=modules%2Fgeom.git IPAL19241 REGR: Incorrect message on Explode if Point is selected as Main Object. --- diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index ae82cc4c1..e9a32d609 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -215,6 +215,7 @@ void EntityGUI_SubShapeDlg::SelectionIntoArgument() S.IsNull() || S.ShapeType() == TopAbs_VERTEX ) { + myObject = GEOM::GEOM_Object::_nil(); updateButtonState(); return; } @@ -524,9 +525,8 @@ GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation() bool EntityGUI_SubShapeDlg::isValid( QString& msg ) { bool isOk = false; - Handle(SALOME_InteractiveObject) IO = firstIObject(); - Standard_Boolean testResult; - myObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult ); + Standard_Boolean testResult; + GEOM::GEOM_Object_var anObj = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); if ( !testResult || myObject->_is_nil() ) { updateButtonState(); return isOk; @@ -535,11 +535,7 @@ bool EntityGUI_SubShapeDlg::isValid( QString& msg ) if ( isAllSubShapes() ) isOk = true; else if ( IObjectCount() == 1 ) { - Standard_Boolean aResult = Standard_False; - GEOM::GEOM_Object_var anObj = - GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult ); - - if ( aResult && !anObj->_is_nil() ) { + if ( testResult && !anObj->_is_nil() ) { TColStd_IndexedMapOfInteger aMapIndex; myGeomGUI->getApp()->selectionMgr()->GetIndexes( firstIObject(), aMapIndex ); isOk = aMapIndex.Extent() > 0;