From eb541c8d4b20adb368ea87f5c7f516c49f5df58a Mon Sep 17 00:00:00 2001 From: adv Date: Fri, 20 Dec 2013 07:47:41 +0000 Subject: [PATCH] Minor changes. --- src/HYDROData/HYDROData_Bathymetry.cxx | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/HYDROData/HYDROData_Bathymetry.cxx b/src/HYDROData/HYDROData_Bathymetry.cxx index ea455bd2..8d679bd2 100644 --- a/src/HYDROData/HYDROData_Bathymetry.cxx +++ b/src/HYDROData/HYDROData_Bathymetry.cxx @@ -490,23 +490,9 @@ bool HYDROData_Bathymetry::CreateBoundaryPolyline() const return false; //search free name - QString aName = GetName() + "_boundary", anIndexedName; - Handle_HYDROData_Entity aFound = HYDROData_Tool::FindObjectByName( aDocument, aName ); - if( aFound.IsNull() ) - aResult->SetName( aName ); - else - { - //use index - aName += "_%0"; - int i = 1; - while( !aFound.IsNull() ) - { - anIndexedName = aName.arg( i ); - aFound = HYDROData_Tool::FindObjectByName( aDocument, anIndexedName ); - i++; - } - aResult->SetName( anIndexedName ); - } + QString aPolylinePref = GetName() + "_Boundary"; + QString aPolylineName = HYDROData_Tool::GenerateObjectName( aDocument, aPolylinePref ); + aResult->SetName( aPolylineName ); double Xmin = 0.0, Xmax = 0.0, Ymin = 0.0, Ymax = 0.0; bool isFirst = true; -- 2.39.2