Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed and split undo classes from TweakBrush (#243)
I renamed the following classes: TweakVertexWeight -> UndoStateVertexWeight TweakBoneWeights -> UndoStateBoneWeights TweakState -> UndoStateShape TweakStateHolder -> UndoStateProject TweakUndo -> UndoHistory UndoHistory was moved into UndoHistory.h and UndoHistory.cpp. The rest were moved into UndoState.h. I also renamed all of the functions in UndoHistory and most instances of variables of any of these types. Keeping track of TweakStroke objects was moved from TweakUndo into wxGLPanel. Now there is only ever one TweakStroke object. I left the constant re-allocation of this object in place; perhaps it should just be re-initialized instead of re-allocated. The state-applying functionality of TweakStateHolder::RestoreStartState, TweakStateHolder::RestoreEndState, TweakUndo::backStroke, TweakUndo::forwardStroke, wxGLPanel::UndoStroke, and wxGLPanel::RedoStroke was consolidated into one function, wxGLPanel::ApplyUndoState. I tried not to change what this code does in any way, but the process was fairly messy, so I could easily have made a mistake. Hopefully the result is much simpler and more maintainable. Plus, it may be convenient to call ApplyUndoState from other places in the future. Co-authored-by: ousnius <ousnius@users.noreply.github.com>
- Loading branch information