Exemple #1
0
 void start() {
     _redoStack.clear();
     if (_undoStack.size() == _undoLevels) {
         _undoStack.pop_front();
     }
     startUndo();
     trackersBegin();
 }
Exemple #2
0
    // Sets the size of the undoStack
    void setLevels(std::size_t levels) {
        if (levels > MAX_UNDO_LEVELS) {
            levels = MAX_UNDO_LEVELS;
        }

        while (_undoStack.size() > levels) {
            _undoStack.pop_front();
        }
        _undoLevels = levels;
    }