Additional fix for IPAL10226.

This commit is contained in:
mzn 2005-12-01 12:55:30 +00:00
parent 106cb1d888
commit 5ed5438bb9

View File

@ -344,25 +344,30 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
if ( aShape.IsNull() ) if ( aShape.IsNull() )
return; return;
TColStd_IndexedMapOfInteger aMap; if ( aShape.ShapeType() != TopAbs_VERTEX )
((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( anIO, aMap );
if ( aMap.Extent() == 1 )
{ {
int anIndex = aMap( 1 ); TColStd_IndexedMapOfInteger aMap;
TopTools_IndexedMapOfShape aShapes;
TopExp::MapShapes( aShape, aShapes );
aShape = aShapes.FindKey( anIndex );
if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_VERTEX ) ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( anIO, aMap );
if ( aMap.Extent() == 1 )
{
int anIndex = aMap( 1 );
TopTools_IndexedMapOfShape aShapes;
TopExp::MapShapes( aShape, aShapes );
aShape = aShapes.FindKey( anIndex );
if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_VERTEX )
return;
}
else
return; return;
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
GroupXYZ->SpinBox_DX->SetValue( aPnt.X() );
GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() );
GroupXYZ->SpinBox_DZ->SetValue( aPnt.Z() );
} }
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
GroupXYZ->SpinBox_DX->SetValue( aPnt.X() );
GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() );
GroupXYZ->SpinBox_DZ->SetValue( aPnt.Z() );
} }
else if ( id == 1 ) else if ( id == 1 )
{ {