Blame toonz/sources/common/tapptools/tparamundo.cpp
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tparamundo.h"
|
|
Toshihiro Shimizu |
890ddd |
//#include "tparam.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tundo.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class ParamUndoManager final : public TParamUndoManager {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ParamUndoManager() {}
|
|
Shinya Kitaoka |
120a6e |
~ParamUndoManager() {}
|
|
Shinya Kitaoka |
473e70 |
void onChange(const TParamChange &change) override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TParamUndoManager *TParamUndoManager::instance() {
|
|
Shinya Kitaoka |
120a6e |
static ParamUndoManager instance;
|
|
Shinya Kitaoka |
120a6e |
return &instance;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void ParamUndoManager::onChange(const TParamChange &change) {
|
|
Shinya Kitaoka |
120a6e |
assert(0);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// if (!change.m_undoing && !change.m_dragging)
|
|
Shinya Kitaoka |
120a6e |
// TUndoManager::manager()->add(change.createUndo());
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-------------------------------------------------------------------
|