SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
- if ( !testResult )
- aSelectedObject = GEOM::GEOM_Object::_nil();
+ if (aSelList.Extent() > 0) {
+ Standard_Boolean testResult = Standard_False;
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ if (!testResult)
+ aSelectedObject = GEOM::GEOM_Object::_nil();
+ }
- if ( myEditCurrentArgument == mySelEdit )
+ if (myEditCurrentArgument == mySelEdit)
myObj = aSelectedObject;
else
myObj2 = aSelectedObject;
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
- if ( !testResult )
- aSelectedObject = GEOM::GEOM_Object::_nil();
+ if (aSelList.Extent() > 0) {
+ Standard_Boolean testResult = Standard_False;
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ if (!testResult)
+ aSelectedObject = GEOM::GEOM_Object::_nil();
+ }
if ( myEditCurrentArgument == mySelEdit )
myObj = aSelectedObject;
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
+ if (aSelList.Extent() < 1)
+ return;
+
Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject =
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if ( !testResult || aSelectedObject->_is_nil() )
+ if (!testResult || aSelectedObject->_is_nil())
return;
myObj = aSelectedObject;
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
- if (!testResult || aSelectedObject->_is_nil()) {
+ if (aSelList.Extent() > 0) {
+ Standard_Boolean testResult = Standard_False;
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ if (!testResult)
+ aSelectedObject = GEOM::GEOM_Object::_nil();
+ }
+
+ if (aSelectedObject->_is_nil()) {
mySelEdit->setText("");
processObject();
erasePreview();