| 718 | } |
| 719 | |
| 720 | void Plugin_Entity::moveRotate(QPointF const& offset, QPointF const& center, double angle, DPI::Disposition disp) { |
| 721 | RS_Entity *ne = entity->clone(); |
| 722 | ne->move( RS_Vector(offset.x(), offset.y()) ); |
| 723 | ne->rotate( RS_Vector(center.x(), center.y()) , angle); |
| 724 | bool ok = dpi->addToUndo(entity, ne, disp); |
| 725 | //if doc interface fails to handle for undo only modify original entity |
| 726 | if (!ok){ |
| 727 | entity->move( RS_Vector(offset.x(), offset.y()) ); |
| 728 | entity->rotate( RS_Vector(center.x(), center.y()) , angle); |
| 729 | delete ne; |
| 730 | } else |
| 731 | this->entity = ne; |
| 732 | } |
| 733 | |
| 734 | void Plugin_Entity::rotate(QPointF center, double angle, DPI::Disposition disp) { |
| 735 | RS_Entity *ne = entity->clone(); |