equal
deleted
inserted
replaced
390 def FindNewName(self, DesiredName): |
390 def FindNewName(self, DesiredName): |
391 """ |
391 """ |
392 Changes Name to DesiredName if available, Name-N if not. |
392 Changes Name to DesiredName if available, Name-N if not. |
393 @param DesiredName: The desired Name (string) |
393 @param DesiredName: The desired Name (string) |
394 """ |
394 """ |
395 # Get Current Name |
395 |
396 CurrentName = self.BaseParams.getName() |
|
397 # Do nothing if no change |
|
398 # if CurrentName == DesiredName: return CurrentName |
|
399 # Build a list of used Name out of parent's Children |
396 # Build a list of used Name out of parent's Children |
400 AllNames = [] |
397 AllNames = [] |
401 for CTNInstance in self.CTNParent.IterChildren(): |
398 for CTNInstance in self.CTNParent.IterChildren(): |
402 if CTNInstance != self: |
399 if CTNInstance != self: |
403 AllNames.append(CTNInstance.BaseParams.getName()) |
400 AllNames.append(CTNInstance.BaseParams.getName()) |