mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-05 12:45:55 +00:00
CScaleNodeCommand: Make use of override where applicable
This commit is contained in:
parent
fc2d48df87
commit
8c4e16d51e
@ -3,16 +3,13 @@
|
|||||||
#include "Editor/INodeEditor.h"
|
#include "Editor/INodeEditor.h"
|
||||||
|
|
||||||
CScaleNodeCommand::CScaleNodeCommand()
|
CScaleNodeCommand::CScaleNodeCommand()
|
||||||
: IUndoCommand("Scale"),
|
: IUndoCommand("Scale")
|
||||||
mpEditor(nullptr),
|
|
||||||
mCommandEnded(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CScaleNodeCommand::CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CVector3f& rkDelta)
|
CScaleNodeCommand::CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CVector3f& rkDelta)
|
||||||
: IUndoCommand("Scale"),
|
: IUndoCommand("Scale"),
|
||||||
mpEditor(pEditor),
|
mpEditor(pEditor)
|
||||||
mCommandEnded(false)
|
|
||||||
{
|
{
|
||||||
mNodeList.reserve(rkNodes.size());
|
mNodeList.reserve(rkNodes.size());
|
||||||
|
|
||||||
|
@ -18,18 +18,19 @@ class CScaleNodeCommand : public IUndoCommand
|
|||||||
CVector3f NewScale;
|
CVector3f NewScale;
|
||||||
};
|
};
|
||||||
QList<SNodeScale> mNodeList;
|
QList<SNodeScale> mNodeList;
|
||||||
INodeEditor *mpEditor;
|
INodeEditor *mpEditor = nullptr;
|
||||||
bool mCommandEnded;
|
bool mCommandEnded = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CScaleNodeCommand();
|
CScaleNodeCommand();
|
||||||
CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CVector3f& rkDelta);
|
CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CVector3f& rkDelta);
|
||||||
~CScaleNodeCommand();
|
~CScaleNodeCommand() override;
|
||||||
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 CScaleNodeCommand* End();
|
static CScaleNodeCommand* End();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user