CTranslateNodeCommand: Make use of in-class initializers where applicable
This commit is contained in:
parent
9c554fc052
commit
2cf3ac718b
|
@ -3,16 +3,13 @@
|
||||||
#include "Editor/INodeEditor.h"
|
#include "Editor/INodeEditor.h"
|
||||||
|
|
||||||
CTranslateNodeCommand::CTranslateNodeCommand()
|
CTranslateNodeCommand::CTranslateNodeCommand()
|
||||||
: IUndoCommand("Translate"),
|
: IUndoCommand("Translate")
|
||||||
mpEditor(nullptr),
|
|
||||||
mCommandEnded(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CTranslateNodeCommand::CTranslateNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, const CVector3f& Delta, ETransformSpace TransformSpace)
|
CTranslateNodeCommand::CTranslateNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, const CVector3f& Delta, ETransformSpace TransformSpace)
|
||||||
: IUndoCommand("Translate"),
|
: IUndoCommand("Translate"),
|
||||||
mpEditor(pEditor),
|
mpEditor(pEditor)
|
||||||
mCommandEnded(false)
|
|
||||||
{
|
{
|
||||||
mNodeList.reserve(rkNodes.size());
|
mNodeList.reserve(rkNodes.size());
|
||||||
|
|
||||||
|
|
|
@ -16,17 +16,18 @@ class CTranslateNodeCommand : public IUndoCommand
|
||||||
CVector3f NewPos;
|
CVector3f NewPos;
|
||||||
};
|
};
|
||||||
QList<SNodeTranslate> mNodeList;
|
QList<SNodeTranslate> mNodeList;
|
||||||
INodeEditor *mpEditor;
|
INodeEditor *mpEditor = nullptr;
|
||||||
bool mCommandEnded;
|
bool mCommandEnded = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CTranslateNodeCommand();
|
CTranslateNodeCommand();
|
||||||
CTranslateNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, const CVector3f& rkDelta, ETransformSpace TransformSpace);
|
CTranslateNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, const CVector3f& rkDelta, ETransformSpace TransformSpace);
|
||||||
int id() const;
|
|
||||||
bool mergeWith(const QUndoCommand *pkOther);
|
int id() const override;
|
||||||
void undo();
|
bool mergeWith(const QUndoCommand *pkOther) override;
|
||||||
void redo();
|
void undo() override;
|
||||||
bool AffectsCleanState() const { return true; }
|
void redo() override;
|
||||||
|
bool AffectsCleanState() const override { return true; }
|
||||||
static CTranslateNodeCommand* End();
|
static CTranslateNodeCommand* End();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue