Kaydet (Commit) 316a0109 authored tarafından Jack Jansen's avatar Jack Jansen

Waste 2.0 has many more options for the undo label.

üst 9ad27523
...@@ -85,7 +85,8 @@ class _ScrollWidget: ...@@ -85,7 +85,8 @@ class _ScrollWidget:
UNDOLABELS = [ # Indexed by WEGetUndoInfo() value 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): class EditText(Wbase.SelectableWidget, _ScrollWidget):
...@@ -452,7 +453,10 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget): ...@@ -452,7 +453,10 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
#if not doundo: #if not doundo:
# return 0 # return 0
which, redo = self.ted.WEGetUndoInfo() which, redo = self.ted.WEGetUndoInfo()
which = UNDOLABELS[which] if which < len(UNDOLABELS):
which = UNDOLABELS[which]
else:
which = ""
if which == None: if which == None:
return None return None
if redo: if redo:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment