| 28 | } |
| 29 | |
| 30 | void ReuseState::buildBoundingBox(const ElementPtr &element) { |
| 31 | if (element->getParent().expired() && |
| 32 | !(element->getBounds() && element->getBounds()->isEmpty())) { |
| 33 | if (_sameRootBounds.get()->isEmpty() && element) { |
| 34 | _sameRootBounds = element->getBounds(); |
| 35 | } |
| 36 | if (equals(_sameRootBounds, element->getBounds())) { |
| 37 | this->_rootBounds = _sameRootBounds; |
| 38 | } else |
| 39 | this->_rootBounds = element->getBounds(); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | void ReuseState::buildStateFromElement(WidgetPtr parentWidget, ElementPtr element) { |
| 44 | buildBoundingBox(element); |