Fix bug when buffering modifications on plain text languages
authorlaurent
Tue, 19 Apr 2011 15:07:57 +0200
changeset 531 193505b8ddcf
parent 530 0fa72713501d
child 532 63e141705d19
Fix bug when buffering modifications on plain text languages
PLCControler.py
--- a/PLCControler.py	Tue Apr 19 14:57:01 2011 +0200
+++ b/PLCControler.py	Tue Apr 19 15:07:57 2011 +0200
@@ -2713,9 +2713,8 @@
     def LoadPrevious(self):
         if self.ProjectBuffer is not None:
             if self.Buffering:
-                self.Project = cPickle.loads(self.ProjectBuffer.Current())
-            else:
-                self.Project = cPickle.loads(self.ProjectBuffer.Previous())
+                self.EndBuffering()
+            self.Project = cPickle.loads(self.ProjectBuffer.Previous())
     
     def LoadNext(self):
         if self.ProjectBuffer is not None: