Fix most undo/redo bugs

This commit is contained in:
xypwn
2020-03-29 18:25:08 +02:00
parent 9414c8c426
commit 0c5772ca52
9 changed files with 48 additions and 27 deletions

View File

@@ -19,7 +19,7 @@ void MoveParts::redo()
else
{
for(auto part : m_parts)
part->moveBy(m_relPos.x(), m_relPos.y());
part->setPos(part->getPos() + m_relPos);
}
}
@@ -27,5 +27,5 @@ void MoveParts::redo()
void MoveParts::undo()
{
for(auto part : m_parts)
part->moveBy(-m_relPos.x(), -m_relPos.y());
part->setPos(part->getPos() - m_relPos);
}