mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 18:30:36 +05:00
Fix regression List.Empty
This commit is contained in:
parent
30b93b81e3
commit
6aed1127dd
@ -153,14 +153,16 @@ void MeasureGUI_AngleDlg::SelectionIntoArgument()
|
||||
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;
|
||||
|
@ -140,12 +140,14 @@ void MeasureGUI_DistanceDlg::SelectionIntoArgument()
|
||||
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;
|
||||
|
@ -131,11 +131,14 @@ void MeasureGUI_PointDlg::SelectionIntoArgument()
|
||||
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;
|
||||
|
@ -250,11 +250,16 @@ void MeasureGUI_Skeleton::SelectionIntoArgument()
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user