| 21 | } |
| 22 | |
| 23 | IUndoStateSaver* UndoSystem::getStateSaver(IUndoable& undoable) |
| 24 | { |
| 25 | auto result = _undoables.try_emplace(&undoable, *this, undoable); |
| 26 | |
| 27 | // If we're in the middle of an active undo operation, assign this to the tracker (#4861) |
| 28 | if (_activeUndoStack != nullptr) |
| 29 | { |
| 30 | result.first->second.setStack(_activeUndoStack); |
| 31 | } |
| 32 | |
| 33 | return &(result.first->second); |
| 34 | } |
| 35 | |
| 36 | void UndoSystem::releaseStateSaver(IUndoable& undoable) |
| 37 | { |
no test coverage detected