equal
deleted
inserted
replaced
663 self.PLCEditor.RefreshTitle() |
663 self.PLCEditor.RefreshTitle() |
664 self.PlugRequestSave() |
664 self.PlugRequestSave() |
665 |
665 |
666 # Update PLCOpenEditor Plugin Block types from loaded plugins |
666 # Update PLCOpenEditor Plugin Block types from loaded plugins |
667 def RefreshPluginsBlockLists(self): |
667 def RefreshPluginsBlockLists(self): |
668 ClearPluginTypes() |
668 if getattr(self, "PluggedChilds", None) is not None: |
669 AddPluginBlockList(self.BlockTypesFactory()) |
669 ClearPluginTypes() |
670 for child in self.IterChilds(): |
670 AddPluginBlockList(self.BlockTypesFactory()) |
671 AddPluginBlockList(child.BlockTypesFactory()) |
671 for child in self.IterChilds(): |
|
672 AddPluginBlockList(child.BlockTypesFactory()) |
|
673 if self.PLCEditor is not None: |
|
674 self.PLCEditor.RefreshEditor() |
672 |
675 |
673 def PlugPath(self, PlugName=None): |
676 def PlugPath(self, PlugName=None): |
674 return self.ProjectPath |
677 return self.ProjectPath |
675 |
678 |
676 def PluginXmlFilePath(self, PlugName=None): |
679 def PluginXmlFilePath(self, PlugName=None): |
869 ST_viewer.SetText(text) |
872 ST_viewer.SetText(text) |
870 |
873 |
871 new_dialog.Show() |
874 new_dialog.Show() |
872 |
875 |
873 def _EditPLC(self, logger): |
876 def _EditPLC(self, logger): |
874 if not self.PLCEditor: |
877 if self.PLCEditor is None: |
875 self.RefreshPluginsBlockLists() |
878 self.RefreshPluginsBlockLists() |
876 def _onclose(): |
879 def _onclose(): |
877 self.PLCEditor = None |
880 self.PLCEditor = None |
878 def _onsave(): |
881 def _onsave(): |
879 self.SaveProject() |
882 self.SaveProject() |