--- a/PLCControler.py Thu Jun 09 17:51:53 2011 +0200
+++ b/PLCControler.py Tue Jun 14 17:38:59 2011 +0200
@@ -2698,6 +2698,7 @@
self.Buffering = False
def MarkProjectAsSaved(self):
+ self.EndBuffering()
if self.ProjectBuffer is not None:
self.ProjectBuffer.CurrentSaved()
else:
@@ -2711,9 +2712,8 @@
return self.ProjectSaved
def LoadPrevious(self):
+ self.EndBuffering()
if self.ProjectBuffer is not None:
- if self.Buffering:
- self.EndBuffering()
self.Project = cPickle.loads(self.ProjectBuffer.Previous())
def LoadNext(self):
@@ -2722,7 +2722,7 @@
def GetBufferState(self):
if self.ProjectBuffer is not None:
- first = self.ProjectBuffer.IsFirst()
- last = self.ProjectBuffer.IsLast() and not self.Buffering
+ first = self.ProjectBuffer.IsFirst() and not self.Buffering
+ last = self.ProjectBuffer.IsLast()
return not first, not last
return False, False