equal
deleted
inserted
replaced
297 """ |
297 """ |
298 Close current state |
298 Close current state |
299 """ |
299 """ |
300 def CloseCurrent(self, ignore = False): |
300 def CloseCurrent(self, ignore = False): |
301 # Verify if it's not forced that the current node is saved before closing it |
301 # Verify if it's not forced that the current node is saved before closing it |
302 if self.UndoBuffers[self.NodeIndex].IsCurrentSaved() or ignore: |
302 if self.NodeIndex in self.UndoBuffers and (self.UndoBuffers[self.NodeIndex].IsCurrentSaved() or ignore): |
303 self.RemoveNodeBuffer(self.NodeIndex) |
303 self.RemoveNodeBuffer(self.NodeIndex) |
304 if len(self.UndoBuffers) > 0: |
304 if len(self.UndoBuffers) > 0: |
305 previousindexes = [idx for idx in self.UndoBuffers.keys() if idx < self.NodeIndex] |
305 previousindexes = [idx for idx in self.UndoBuffers.keys() if idx < self.NodeIndex] |
306 nextindexes = [idx for idx in self.UndoBuffers.keys() if idx > self.NodeIndex] |
306 nextindexes = [idx for idx in self.UndoBuffers.keys() if idx > self.NodeIndex] |
307 if len(previousindexes) > 0: |
307 if len(previousindexes) > 0: |
333 |
333 |
334 """ |
334 """ |
335 Export to an eds file and store it in a new buffer if no node edited |
335 Export to an eds file and store it in a new buffer if no node edited |
336 """ |
336 """ |
337 def ExportCurrentToEDSFile(self, filepath): |
337 def ExportCurrentToEDSFile(self, filepath): |
338 return eds_utils.GenerateEDSFile(filepath, self) |
338 return eds_utils.GenerateEDSFile(filepath, self.CurrentNode) |
339 |
339 |
340 """ |
340 """ |
341 Build the C definition of Object Dictionary for current node |
341 Build the C definition of Object Dictionary for current node |
342 """ |
342 """ |
343 def ExportCurrentToCFile(self, filepath): |
343 def ExportCurrentToCFile(self, filepath): |