From 0685d3c50dafa4140e9828ef632132c0feb125ee Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 29 Jun 2015 15:12:56 +0300 Subject: [PATCH] #585: patch for names for result --- src/HYDROData/HYDROData_PolylineOperator.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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; } -- 2.39.2