equal
deleted
inserted
replaced
513 old_computedname = self.ComputePouTransitionName(pou_name, old_name) |
513 old_computedname = self.ComputePouTransitionName(pou_name, old_name) |
514 new_computedname = self.ComputePouTransitionName(pou_name, new_name) |
514 new_computedname = self.ComputePouTransitionName(pou_name, new_name) |
515 if old_computedname in self.ElementsOpened: |
515 if old_computedname in self.ElementsOpened: |
516 idx = self.ElementsOpened.index(old_computedname) |
516 idx = self.ElementsOpened.index(old_computedname) |
517 self.ElementsOpened[idx] = new_computedname |
517 self.ElementsOpened[idx] = new_computedname |
|
518 pou.updateElementName(old_name, new_name) |
518 self.BufferProject() |
519 self.BufferProject() |
519 |
520 |
520 # Change the name of a pou action |
521 # Change the name of a pou action |
521 def ChangePouActionName(self, pou_name, old_name, new_name): |
522 def ChangePouActionName(self, pou_name, old_name, new_name): |
522 # Found the pou action corresponding to old name and change its name to new name |
523 # Found the pou action corresponding to old name and change its name to new name |
527 old_computedname = self.ComputePouActionName(pou_name, old_name) |
528 old_computedname = self.ComputePouActionName(pou_name, old_name) |
528 new_computedname = self.ComputePouActionName(pou_name, new_name) |
529 new_computedname = self.ComputePouActionName(pou_name, new_name) |
529 if old_computedname in self.ElementsOpened: |
530 if old_computedname in self.ElementsOpened: |
530 idx = self.ElementsOpened.index(old_computedname) |
531 idx = self.ElementsOpened.index(old_computedname) |
531 self.ElementsOpened[idx] = new_computedname |
532 self.ElementsOpened[idx] = new_computedname |
|
533 pou.updateElementName(old_name, new_name) |
532 self.BufferProject() |
534 self.BufferProject() |
533 |
535 |
534 # Change the name of a pou variable |
536 # Change the name of a pou variable |
535 def ChangePouVariableName(self, pou_name, old_name, new_name): |
537 def ChangePouVariableName(self, pou_name, old_name, new_name): |
536 # Found the pou action corresponding to old name and change its name to new name |
538 # Found the pou action corresponding to old name and change its name to new name |