From 01adc22141c7a712de3fe506fbb7753d4ba06389 Mon Sep 17 00:00:00 2001 From: enk Date: Mon, 12 Sep 2005 08:01:11 +0000 Subject: [PATCH] Fixed: Bug IPAL9938 Strange "ERROR" message appears in terminal during curve creation. --- src/BasicGUI/BasicGUI_CurveDlg.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index 598c5f47b..8fba90e2f 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -224,7 +224,7 @@ static int isPointInList(list& thePoints, } //================================================================================= /*! function : removeUnnecessaryPnt() - * purpose : Remove unnecessary point from list \a theOldPoints + * purpose : Remove unnecessary points from list \a theOldPoints * \author enk * \li \a theOldPoints - ordered sequence with unnecessary point * \li \a theNewPoints - not ordered sequence with necessary points @@ -233,6 +233,7 @@ static int isPointInList(list& thePoints, static void removeUnnecessaryPnt(list& theOldPoints, GEOM::ListOfGO_var& theNewPoints) { + list objs_to_remove; for(list::iterator i=theOldPoints.begin();i!=theOldPoints.end();i++){ bool found = false; for (int j=0;jlength() && !found ; j++){ @@ -241,10 +242,13 @@ static void removeUnnecessaryPnt(list& theOldPoints, } } if(!found){ - theOldPoints.remove(*i); - return; + objs_to_remove.push_back(*i); + //cout << "removed: " << (*i)->GetEntry() << endl; } } + for(list::iterator i=objs_to_remove.begin();i!=objs_to_remove.end();i++){ + theOldPoints.remove(*i); + } } //================================================================================= @@ -286,7 +290,7 @@ void BasicGUI_CurveDlg::SelectionIntoArgument() for (list::iterator j=myOrderedSel.begin();j!=myOrderedSel.end();j++) myPoints[k++] = *j; } else { - cout << "ERROR: Ordered sequence size != selection sequence size! ("<length()<<")"<LineEdit1->setText( QString::number( i ) + "_" + tr( "GEOM_POINT" ) + tr( "_S_" ) ); -- 2.39.2