pyface icon indicating copy to clipboard operation
pyface copied to clipboard

UndoAction and RedoAction should enable/disable when unavailable

Open corranwebster opened this issue 3 years ago • 0 comments

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.

corranwebster avatar Jan 31 '21 09:01 corranwebster