Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 316a010

Browse files
committed
Waste 2.0 has many more options for the undo label.
1 parent 9ad2752 commit 316a010

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Mac/Tools/IDE/Wtext.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def updatescrollbars(self):
8585

8686

8787
UNDOLABELS = [ # Indexed by WEGetUndoInfo() value
88-
None, "", "typing", "Cut", "Paste", "Clear", "Drag", "Style"]
88+
None, "", "typing", "Cut", "Paste", "Clear", "Drag", "Style",
89+
"Ruler", "backspace", "delete", "transform", "resize"]
8990

9091

9192
class EditText(Wbase.SelectableWidget, _ScrollWidget):
@@ -452,7 +453,10 @@ def can_undo(self, menuitem):
452453
#if not doundo:
453454
# return 0
454455
which, redo = self.ted.WEGetUndoInfo()
455-
which = UNDOLABELS[which]
456+
if which < len(UNDOLABELS):
457+
which = UNDOLABELS[which]
458+
else:
459+
which = ""
456460
if which == None:
457461
return None
458462
if redo:

0 commit comments

Comments
 (0)