Les modifications de points sur les polygones sont desormais annulables

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@106 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-08-25 15:04:45 +00:00
parent 4203f869fb
commit 1dd23c8af8
3 changed files with 50 additions and 2 deletions

View File

@@ -162,3 +162,27 @@ void ChangePartCommand::undo() {
void ChangePartCommand::redo() {
cep -> setProperty(property, new_value);
}
ChangePolygonPointsCommand::ChangePolygonPointsCommand(
PartPolygon *p,
const QVector<QPointF> &o_points,
const QVector<QPointF> &n_points,
QUndoCommand *parent
) :
QUndoCommand(QObject::tr("modification points polygone"), parent),
polygon(p),
old_points(o_points),
new_points(n_points)
{
}
ChangePolygonPointsCommand::~ChangePolygonPointsCommand() {
}
void ChangePolygonPointsCommand::undo() {
polygon -> setPolygon(old_points);
}
void ChangePolygonPointsCommand::redo() {
polygon -> setPolygon(new_points);
}