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