Undocommand SavePieceOptions. Don't need anymore pointer to scene.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-11-24 21:27:47 +02:00
parent 422fb60dcc
commit 024f1373f6
2 changed files with 3 additions and 6 deletions

View File

@ -48,12 +48,10 @@ class QDomElement;
class QUndoCommand; class QUndoCommand;
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
SavePieceOptions::SavePieceOptions(const VPiece &oldDet, const VPiece &newDet, VAbstractPattern *doc, quint32 id, SavePieceOptions::SavePieceOptions(const VPiece &oldDet, const VPiece &newDet, VAbstractPattern *doc, quint32 id, QUndoCommand *parent)
QGraphicsScene *scene, QUndoCommand *parent)
: VUndoCommand(QDomElement(), doc, parent), : VUndoCommand(QDomElement(), doc, parent),
m_oldDet(oldDet), m_oldDet(oldDet),
m_newDet(newDet), m_newDet(newDet)
m_scene(scene)
{ {
setText(tr("save detail option")); setText(tr("save detail option"));
nodeId = id; nodeId = id;

View File

@ -43,7 +43,7 @@ class SavePieceOptions : public VUndoCommand
{ {
public: public:
SavePieceOptions(const VPiece &m_oldDet, const VPiece &m_newDet, VAbstractPattern *doc, quint32 id, SavePieceOptions(const VPiece &m_oldDet, const VPiece &m_newDet, VAbstractPattern *doc, quint32 id,
QGraphicsScene *m_scene, QUndoCommand *parent = nullptr); QUndoCommand *parent = nullptr);
virtual ~SavePieceOptions(); virtual ~SavePieceOptions();
virtual void undo() Q_DECL_OVERRIDE; virtual void undo() Q_DECL_OVERRIDE;
@ -57,7 +57,6 @@ private:
const VPiece m_oldDet; const VPiece m_oldDet;
VPiece m_newDet; VPiece m_newDet;
QGraphicsScene *m_scene;
}; };
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------