equal
deleted
inserted
replaced
688 self.PluginMethods = [dic.copy() for dic in self.PluginMethods] |
688 self.PluginMethods = [dic.copy() for dic in self.PluginMethods] |
689 |
689 |
690 def PlugTestModified(self): |
690 def PlugTestModified(self): |
691 return self.ChangesToSave or not self.ProjectIsSaved() |
691 return self.ChangesToSave or not self.ProjectIsSaved() |
692 |
692 |
693 def HasProjectOpened(self): |
|
694 """ |
|
695 Return if a project is actually opened |
|
696 """ |
|
697 return self.ProjectPath != None |
|
698 |
|
699 def GetPlugRoot(self): |
693 def GetPlugRoot(self): |
700 return self |
694 return self |
701 |
695 |
702 def GetCurrentLocation(self): |
696 def GetCurrentLocation(self): |
703 return () |
697 return () |
794 if not self.SaveXMLFile(): |
788 if not self.SaveXMLFile(): |
795 self.SaveXMLFile(os.path.join(self.ProjectPath, 'plc.xml')) |
789 self.SaveXMLFile(os.path.join(self.ProjectPath, 'plc.xml')) |
796 if self.PLCEditor: |
790 if self.PLCEditor: |
797 self.PLCEditor.RefreshTitle() |
791 self.PLCEditor.RefreshTitle() |
798 self.PlugRequestSave() |
792 self.PlugRequestSave() |
799 |
|
800 def CloseProject(self): |
|
801 self.ProjectPath = None |
|
802 self.PluggedChilds = {} |
|
803 |
793 |
804 # Update PLCOpenEditor Plugin Block types from loaded plugins |
794 # Update PLCOpenEditor Plugin Block types from loaded plugins |
805 def RefreshPluginsBlockLists(self): |
795 def RefreshPluginsBlockLists(self): |
806 if getattr(self, "PluggedChilds", None) is not None: |
796 if getattr(self, "PluggedChilds", None) is not None: |
807 self.ClearPluginTypes() |
797 self.ClearPluginTypes() |