mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-01 04:10:34 +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;
|
SALOME_ListIO aSelList;
|
||||||
aSelMgr->selectedObjects(aSelList);
|
aSelMgr->selectedObjects(aSelList);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||||
|
|
||||||
|
if (aSelList.Extent() > 0) {
|
||||||
Standard_Boolean testResult = Standard_False;
|
Standard_Boolean testResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject =
|
aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
|
||||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
|
if (!testResult)
|
||||||
|
|
||||||
if ( !testResult )
|
|
||||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||||
|
}
|
||||||
|
|
||||||
if ( myEditCurrentArgument == mySelEdit )
|
if (myEditCurrentArgument == mySelEdit)
|
||||||
myObj = aSelectedObject;
|
myObj = aSelectedObject;
|
||||||
else
|
else
|
||||||
myObj2 = aSelectedObject;
|
myObj2 = aSelectedObject;
|
||||||
|
@ -140,12 +140,14 @@ void MeasureGUI_DistanceDlg::SelectionIntoArgument()
|
|||||||
SALOME_ListIO aSelList;
|
SALOME_ListIO aSelList;
|
||||||
aSelMgr->selectedObjects(aSelList);
|
aSelMgr->selectedObjects(aSelList);
|
||||||
|
|
||||||
Standard_Boolean testResult = Standard_False;
|
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||||
GEOM::GEOM_Object_var aSelectedObject =
|
|
||||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
|
|
||||||
|
|
||||||
if ( !testResult )
|
if (aSelList.Extent() > 0) {
|
||||||
|
Standard_Boolean testResult = Standard_False;
|
||||||
|
aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
|
||||||
|
if (!testResult)
|
||||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||||
|
}
|
||||||
|
|
||||||
if ( myEditCurrentArgument == mySelEdit )
|
if ( myEditCurrentArgument == mySelEdit )
|
||||||
myObj = aSelectedObject;
|
myObj = aSelectedObject;
|
||||||
|
@ -131,11 +131,14 @@ void MeasureGUI_PointDlg::SelectionIntoArgument()
|
|||||||
SALOME_ListIO aSelList;
|
SALOME_ListIO aSelList;
|
||||||
aSelMgr->selectedObjects(aSelList);
|
aSelMgr->selectedObjects(aSelList);
|
||||||
|
|
||||||
|
if (aSelList.Extent() < 1)
|
||||||
|
return;
|
||||||
|
|
||||||
Standard_Boolean testResult = Standard_False;
|
Standard_Boolean testResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject =
|
GEOM::GEOM_Object_var aSelectedObject =
|
||||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
|
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
|
||||||
|
|
||||||
if ( !testResult || aSelectedObject->_is_nil() )
|
if (!testResult || aSelectedObject->_is_nil())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
myObj = aSelectedObject;
|
myObj = aSelectedObject;
|
||||||
|
@ -250,11 +250,16 @@ void MeasureGUI_Skeleton::SelectionIntoArgument()
|
|||||||
SALOME_ListIO aSelList;
|
SALOME_ListIO aSelList;
|
||||||
aSelMgr->selectedObjects(aSelList);
|
aSelMgr->selectedObjects(aSelList);
|
||||||
|
|
||||||
Standard_Boolean testResult = Standard_False;
|
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||||
GEOM::GEOM_Object_var aSelectedObject =
|
|
||||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
|
|
||||||
|
|
||||||
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("");
|
mySelEdit->setText("");
|
||||||
processObject();
|
processObject();
|
||||||
erasePreview();
|
erasePreview();
|
||||||
|
Loading…
Reference in New Issue
Block a user