-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// GEOM GEOMGUI : GUI for Geometry component
// File : BasicGUI_CurveDlg.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-
+//
#include "BasicGUI_CurveDlg.h"
#include <DlgRef.h>
myPoints->length( 0 );
myEditCurrentArgument->setText( "" );
+ qApp->processEvents();
+ updateGeometry();
+ resize( minimumSizeHint() );
+ SelectionIntoArgument();
}
{
myEditCurrentArgument->setText( "" );
- Standard_Boolean aRes = Standard_False;
-
SalomeApp_Application* app = myGeomGUI->getApp();
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
_PTR(Study) aDStudy = appStudy->studyDS();
// that will actually be put into myPoints
for (SALOME_ListIteratorOfListIO anIt (selected); anIt.More(); anIt.Next()) {
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(anIt.Value(), aRes);
- if (!CORBA::is_nil(aSelectedObject) && aRes) {
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value() );
+ if (!CORBA::is_nil(aSelectedObject) ) {
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull()) {
aSelMgr->GetIndexes(anIt.Value(), aMapIndexes);
}
}
else { // aMap.Extent() == 0
- int pos = isPointInList( myOrderedSel, aSelectedObject );
- if ( pos == -1 )
- myOrderedSel.push_back( aSelectedObject );
- aList.push_back( aSelectedObject );
+ if ( aShape.ShapeType() == TopAbs_VERTEX ) {
+ int pos = isPointInList( myOrderedSel, aSelectedObject );
+ if ( pos == -1 )
+ myOrderedSel.push_back( aSelectedObject );
+ aList.push_back( aSelectedObject );
+ }
}
}
}
GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() );
+
switch ( getConstructorId() ) {
case 0 :
- anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakePolyline( myPoints );
+ anObj = anOper->MakePolyline( myPoints );
res = true;
break;
case 1 :
- anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSplineBezier( myPoints );
+ anObj = anOper->MakeSplineBezier( myPoints );
res = true;
break;
case 2 :
- anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->
- MakeSplineInterpolation( myPoints, GroupPoints->CheckButton1->isChecked() );
+ anObj = anOper->MakeSplineInterpolation( myPoints, GroupPoints->CheckButton1->isChecked() );
res = true;
break;
}