mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 22:32:03 +05:00
Fix problem with local selection in Create Point Dialog
This commit is contained in:
parent
979d2fe102
commit
9dd38eb01a
@ -417,11 +417,10 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
if (!CORBA::is_nil(aSelectedObject) && aRes)
|
if (!CORBA::is_nil(aSelectedObject) && aRes)
|
||||||
{
|
{
|
||||||
QString aName = GEOMBase::GetName(aSelectedObject);
|
QString aName = GEOMBase::GetName(aSelectedObject);
|
||||||
|
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
|
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
|
||||||
{
|
{
|
||||||
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
|
|
||||||
if (id == 2 || id == 3)
|
if (id == 2 || id == 3)
|
||||||
aNeedType = TopAbs_EDGE;
|
aNeedType = TopAbs_EDGE;
|
||||||
if(id == 4)
|
if(id == 4)
|
||||||
@ -447,6 +446,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
|
GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE);
|
||||||
}
|
}
|
||||||
else // Global Selection
|
else // Global Selection
|
||||||
{
|
{
|
||||||
@ -460,7 +460,8 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
{
|
{
|
||||||
if (aShape.IsNull()) return;
|
if (aShape.IsNull() || aShape.ShapeType() != aNeedType)
|
||||||
|
return;
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
GroupXYZ->SpinBox_DX->SetValue( aPnt.X() );
|
GroupXYZ->SpinBox_DX->SetValue( aPnt.X() );
|
||||||
GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() );
|
GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user