| 1708 | } |
| 1709 | |
| 1710 | void WorksheetPrivate::setContainerRect(WorksheetElementContainer* elem, double x, double y, double h, double w, bool undoable) { |
| 1711 | if (useViewSize) { |
| 1712 | // when using the view size, no need to put rect changes onto the undo-stack |
| 1713 | elem->setUndoAware(false); |
| 1714 | elem->setRect(QRectF(x, y, w, h)); |
| 1715 | elem->setUndoAware(true); |
| 1716 | } else { |
| 1717 | // don't put rect changed onto the undo-stack if undoable-flag is set to true, |
| 1718 | // e.g. when new child is added or removed (the layout and the childrend rects will be updated anyway) |
| 1719 | if (!undoable) { |
| 1720 | elem->setUndoAware(false); |
| 1721 | elem->setRect(QRectF(x, y, w, h)); |
| 1722 | elem->setUndoAware(true); |
| 1723 | } else |
| 1724 | elem->setRect(QRectF(x, y, w, h)); |
| 1725 | } |
| 1726 | elem->graphicsItem()->setFlag(QGraphicsItem::ItemIsMovable, false); |
| 1727 | } |
| 1728 | |
| 1729 | // ############################################################################## |
| 1730 | // ################## Serialization/Deserialization ########################### |
nothing calls this directly
no test coverage detected