E5XML/SessionReader.py

changeset 938
f421f2138c0f
parent 791
9ec2ac20e54e
child 945
8cd4d08fa9f6
--- a/E5XML/SessionReader.py	Thu Mar 10 14:00:34 2011 +0100
+++ b/E5XML/SessionReader.py	Thu Mar 10 14:50:53 2011 +0100
@@ -105,7 +105,7 @@
                     cindex = int(self.attribute("cindex", "0"))
                     folds = self.attribute("folds")
                     if folds:
-                        folds = [int(f) for f in folds.split(',')]
+                        folds = [int(f) - 1 for f in folds.split(',')]
                     else:
                         folds = []
                     zoom = int(self.attribute("zoom", "-9999"))
@@ -118,8 +118,7 @@
                             ed.zoomTo(zoom)
                         if folds:
                             ed.recolor()
-                            for line in folds:
-                                ed.foldLine(line - 1)
+                            ed.setContractedFolds(folds)
                         ed.setCursorPosition(cline, cindex)
                         ed.ensureCursorVisible()
                 else:

eric ide

mercurial