mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +05:00
A small bug is fixed.
This commit is contained in:
parent
629a486f19
commit
521dab878e
@ -281,7 +281,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_PointDlg::ClickOnOk()
|
void BasicGUI_PointDlg::ClickOnOk()
|
||||||
{
|
{
|
||||||
if ( ClickOnApply() )
|
if ( onAccept() )
|
||||||
ClickOnCancel();
|
ClickOnCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -535,26 +535,29 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( getConstructorId() == 1 || getConstructorId() == 2 )
|
if ( getConstructorId() == 1 || getConstructorId() == 2 )
|
||||||
|
{
|
||||||
|
TopoDS_Shape aShape;
|
||||||
|
if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
|
||||||
{
|
{
|
||||||
TopoDS_Shape aShape;
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
|
myX->setText( QString( "%1" ).arg( aPnt.X() ) );
|
||||||
{
|
myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
|
||||||
myX->setText( QString( "%1" ).arg( aPnt.X() ) );
|
|
||||||
myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
|
|
||||||
myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
myX->setText( "" );
|
|
||||||
myY->setText( "" );
|
|
||||||
myZ->setText( "" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
myX->setText( "" );
|
||||||
|
myY->setText( "" );
|
||||||
|
myZ->setText( "" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() )
|
||||||
|
{
|
||||||
|
//printf( "--> a valid point is created\n" );
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user