From: asv Date: Fri, 3 Jun 2005 10:39:10 +0000 (+0000) Subject: A small bug is fixed. X-Git-Tag: T3_0_0_a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=521dab878e0ff6bf99fe59292761517c015c5888;p=modules%2Fgeom.git A small bug is fixed. --- diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 7b349ef0a..95f12b750 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -281,7 +281,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) //================================================================================= void BasicGUI_PointDlg::ClickOnOk() { - if ( ClickOnApply() ) + if ( onAccept() ) ClickOnCancel(); } @@ -535,26 +535,29 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects ) } if ( getConstructorId() == 1 || getConstructorId() == 2 ) + { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) + { + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + myX->setText( QString( "%1" ).arg( aPnt.X() ) ); + myY->setText( QString( "%1" ).arg( aPnt.Y() ) ); + myZ->setText( QString( "%1" ).arg( aPnt.Z() ) ); + } + else { - TopoDS_Shape aShape; - if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) - { - gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); - 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( "" ); - } + myX->setText( "" ); + myY->setText( "" ); + myZ->setText( "" ); } + } if ( !anObj->_is_nil() ) + { + //printf( "--> a valid point is created\n" ); objects.push_back( anObj._retn() ); - + } + return res; }