#12 isUndoAvailable/isRedoAvailable

Next Minor Release
closed
API (5)
5
2009-01-01
2008-12-04
No

Can we have two method : isUndoAvailable and isRedoAvailable on QDocument or on QEditor :
- isUndoAvailable : return true if there is something in the stack of undo
- isRedoAvailable : return true if undo is called and redo can be called

Discussion

  • fullmetalcoder
    fullmetalcoder
    2008-12-08

    There are already two signals in QDocument which you can use to achieve that (or which may fit better for some design than the methods you request).

    Anyway, I've added these convenience methods to both QEditor and QDocument but, for consistency, I kept the names from QUndoStack, i.e canUndo() and canRedo().

     
  • fullmetalcoder
    fullmetalcoder
    2008-12-08

    • labels: --> API
    • milestone: --> Next Minor Release
    • assigned_to: nobody --> fullmetalcoder
     
  • thanks

     
  • fullmetalcoder
    fullmetalcoder
    2009-01-01

    • status: open --> closed