From: asl Date: Mon, 29 Jun 2015 12:12:56 +0000 (+0300) Subject: #585: patch for names for result X-Git-Tag: v1.4.2~10^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0685d3c50dafa4140e9828ef632132c0feb125ee;p=modules%2Fhydro.git #585: patch for names for result --- diff --git a/src/HYDROData/HYDROData_PolylineOperator.cxx b/src/HYDROData/HYDROData_PolylineOperator.cxx index 757805c1..96ad9b4d 100644 --- a/src/HYDROData/HYDROData_PolylineOperator.cxx +++ b/src/HYDROData/HYDROData_PolylineOperator.cxx @@ -208,6 +208,7 @@ bool HYDROData_PolylineOperator::CreatePolylines( const Handle( HYDROData_Docume return false; int n = theShapes.size(); + int anIndex = 1; for( int i=0; iSetShape( theShapes[i] ); - //TODO: set name + + if( isUseIndices ) + { + QString aNewName = theNamePrefix + "_" + QString::number( anIndex ); + if( theDoc->FindObjectByName( aNewName ).IsNull() ) // the object with such a name is not found + aPolyline->SetName( aNewName ); + anIndex++; + } + else + { + aPolyline->SetName( theNamePrefix ); + } } return true; }