pyface
pyface copied to clipboard
UndoAction and RedoAction should enable/disable when unavailable
Currently UndoAction
and RedoAction
are always enabled. However, if there is nothing to undo or redo, standard OS behaviour is to disable the actions.
This may require some changes to the IUndoManager
and ICommandStack
, as the current interface has no direct, reliable signal that the undo
or redo
methods do anything - currently they use the undo_name
and redo_name
as signals, but this requires all Command
objects to have a non-empty name, which seems fragile.