]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
IPAL19241 REGR: Incorrect message on Explode if Point is selected as Main Object.
authordmv <dmv@opencascade.com>
Mon, 19 May 2008 06:58:42 +0000 (06:58 +0000)
committerdmv <dmv@opencascade.com>
Mon, 19 May 2008 06:58:42 +0000 (06:58 +0000)
src/EntityGUI/EntityGUI_SubShapeDlg.cxx

index ae82cc4c159b3a61f7a8de98c9beb1a737384709..e9a32d609488d7e79cad7c07560f3dc9d7a7d362 100644 (file)
@@ -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;