]> granicus.if.org Git - python/commitdiff
Waste 2.0 has many more options for the undo label.
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 21 Feb 2001 15:45:55 +0000 (15:45 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 21 Feb 2001 15:45:55 +0000 (15:45 +0000)
Mac/Tools/IDE/Wtext.py

index 11b02768e6f27c40670f947ecf88b1ae1507fedd..41ea5ec818e2fd0fbef6578f892be459a58ca2dc 100644 (file)
@@ -85,7 +85,8 @@ class _ScrollWidget:
        
 
 UNDOLABELS = [ # Indexed by WEGetUndoInfo() value
-       None, "", "typing", "Cut", "Paste", "Clear", "Drag", "Style"]
+       None, "", "typing", "Cut", "Paste", "Clear", "Drag", "Style",
+       "Ruler", "backspace", "delete", "transform", "resize"]
 
 
 class EditText(Wbase.SelectableWidget, _ScrollWidget):
@@ -452,7 +453,10 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
                #if not doundo:
                #       return 0
                which, redo = self.ted.WEGetUndoInfo()
-               which = UNDOLABELS[which]
+               if which < len(UNDOLABELS):
+                       which = UNDOLABELS[which]
+               else:
+                       which = ""
                if which == None: 
                        return None
                if redo: