PLCControler.py
changeset 351 160ff73c0ac7
parent 349 96cc6179b918
child 352 5cd60f7e510c
equal deleted inserted replaced
350:f7958989e055 351:160ff73c0ac7
  2677                 xmlfile = open(filepath,"w")
  2677                 xmlfile = open(filepath,"w")
  2678             else:
  2678             else:
  2679                 xmlfile = open(self.FilePath,"w")
  2679                 xmlfile = open(self.FilePath,"w")
  2680             xmlfile.write(text)
  2680             xmlfile.write(text)
  2681             xmlfile.close()
  2681             xmlfile.close()
  2682             self.ProjectSaved()
  2682             self.MarkProjectAsSaved()
  2683             if filepath:
  2683             if filepath:
  2684                 self.SetFilePath(filepath)
  2684                 self.SetFilePath(filepath)
  2685             return True
  2685             return True
  2686 
  2686 
  2687 #-------------------------------------------------------------------------------
  2687 #-------------------------------------------------------------------------------
  2729     def EndBuffering(self):
  2729     def EndBuffering(self):
  2730         if self.ProjectBuffer is not None and self.Buffering:
  2730         if self.ProjectBuffer is not None and self.Buffering:
  2731             self.Project = self.Copy(self.Project)
  2731             self.Project = self.Copy(self.Project)
  2732             self.Buffering = False
  2732             self.Buffering = False
  2733 
  2733 
  2734     def ProjectSaved(self):
  2734     def MarkProjectAsSaved(self):
  2735         if self.ProjectBuffer is not None:
  2735         if self.ProjectBuffer is not None:
  2736             self.ProjectBuffer.CurrentSaved()
  2736             self.ProjectBuffer.CurrentSaved()
  2737         else:
  2737         else:
  2738             self.ProjectSaved = True
  2738             self.ProjectSaved = True
  2739     
  2739