Ver código fonte

wx vdigit: another undo/redo fix

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63365 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 10 anos atrás
pai
commit
65056efa32
1 arquivos alterados com 12 adições e 2 exclusões
  1. 12 2
      gui/wxpython/vdigit/wxdigit.py

+ 12 - 2
gui/wxpython/vdigit/wxdigit.py

@@ -405,8 +405,18 @@ class IVDigit:
         
         ret = 0
         actions = self.changesets[changeset]
-        
-        for action in actions:
+	
+        if undo:
+            firstaction = 0
+            lastaction = len(actions)
+            step = 1
+        else:
+            firstaction = len(actions) - 1
+            lastaction = -1
+            step = -1
+
+        for i in range(firstaction, lastaction, step):
+            action = actions[i]
             line = action['line']
             if action['offset'] > 0:
                 if Vect_line_alive(self.poMapInfo, line):