-// GEOM GEOMGUI : GUI for Geometry component
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//
-//
+// GEOM GEOMGUI : GUI for Geometry component
// File : BasicGUI_PointDlg.cxx
// Author : Lucien PIGNOLONI
// Module : GEOM
// $Header$
-
+//
#include "BasicGUI_PointDlg.h"
#include "SUIT_Session.h"
myY->setPalette( aPal );
myZ->setPalette( aPal );
- // setHelpFileName("create_point_page.html");
- setHelpFileName("point.htm");
+ setHelpFileName("create_point_page.html");
Init();
}
if (!CORBA::is_nil(aSelectedObject) && aRes)
{
QString aName = GEOMBase::GetName(aSelectedObject);
-
+ TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
TopoDS_Shape aShape;
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{
- TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
if (id == 2 || id == 3)
aNeedType = TopAbs_EDGE;
if(id == 4)
}
else
aSelectedObject = aFindedObject; // get Object from study
+ GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE);
}
else // Global Selection
{
if (id == 0)
{
- if (aShape.IsNull()) return;
+ if (aShape.IsNull() || aShape.ShapeType() != aNeedType)
+ return;
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
GroupXYZ->SpinBox_DX->SetValue( aPnt.X() );
GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() );