X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBasicGUI%2FBasicGUI_CurveDlg.cxx;h=2a962c46180c4427c13a3511d6f6c7b382b939b3;hb=643c92eb8f6e84b5643ba9c3bc990110d166f96b;hp=a2c17827b32c6dc61be20c1b5538b430e8699f0b;hpb=522b8bee2266d0688108a4e7084ec857385212f4;p=modules%2Fgeom.git diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index a2c17827b..2a962c461 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -1,4 +1,4 @@ -// 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 @@ -19,10 +19,11 @@ // // 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 @@ -157,6 +158,10 @@ void BasicGUI_CurveDlg::ConstructorsClicked( int id ) myPoints->length( 0 ); myEditCurrentArgument->setText( "" ); + qApp->processEvents(); + updateGeometry(); + resize( minimumSizeHint() ); + SelectionIntoArgument(); } @@ -281,8 +286,6 @@ void BasicGUI_CurveDlg::SelectionIntoArgument() { myEditCurrentArgument->setText( "" ); - Standard_Boolean aRes = Standard_False; - SalomeApp_Application* app = myGeomGUI->getApp(); SalomeApp_Study* appStudy = dynamic_cast(app->activeStudy()); _PTR(Study) aDStudy = appStudy->studyDS(); @@ -303,8 +306,8 @@ void BasicGUI_CurveDlg::SelectionIntoArgument() // 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); @@ -341,10 +344,12 @@ void BasicGUI_CurveDlg::SelectionIntoArgument() } } 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 ); + } } } } @@ -439,18 +444,19 @@ bool BasicGUI_CurveDlg::execute( ObjectList& objects ) 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; }