]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Adding support for modification in CanFestival eds_utils
authorlbessard <lbessard>
Thu, 26 Jun 2008 07:24:24 +0000 (07:24 +0000)
committerlbessard <lbessard>
Thu, 26 Jun 2008 07:24:24 +0000 (07:24 +0000)
objdictgen/nodemanager.py

index 5287b2021b6b77c9f21f71950b6d10f679ed58b0..eead5ccf0c32772d5afc588411f19cdf3167644e 100755 (executable)
@@ -299,7 +299,7 @@ class NodeManager:
     """
     def CloseCurrent(self, ignore = False):
         # Verify if it's not forced that the current node is saved before closing it
-        if self.UndoBuffers[self.NodeIndex].IsCurrentSaved() or ignore:
+        if self.NodeIndex in self.UndoBuffers and (self.UndoBuffers[self.NodeIndex].IsCurrentSaved() or ignore):
             self.RemoveNodeBuffer(self.NodeIndex)
             if len(self.UndoBuffers) > 0:
                 previousindexes = [idx for idx in self.UndoBuffers.keys() if idx < self.NodeIndex]
@@ -335,7 +335,7 @@ class NodeManager:
     Export to an eds file and store it in a new buffer if no node edited
     """
     def ExportCurrentToEDSFile(self, filepath):
-        return eds_utils.GenerateEDSFile(filepath, self)
+        return eds_utils.GenerateEDSFile(filepath, self.CurrentNode)
     
     """
     Build the C definition of Object Dictionary for current node