예제 #1
0
 void start() {
     _redoStack.clear();
     if (_undoStack.size() == _undoLevels) {
         _undoStack.pop_front();
     }
     startUndo();
     trackersBegin();
 }
예제 #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;
    }