void MapItem::updateBoundingRect() { QRectF boundingRect = mapDocument()->renderer()->mapBoundingRect(); const QMargins margins = mapDocument()->map()->computeLayerOffsetMargins(); boundingRect.adjust(-margins.left(), -margins.top(), margins.right(), margins.bottom()); const QMargins drawMargins = mapDocument()->map()->drawMargins(); boundingRect.adjust(qMin(0, -drawMargins.left()), qMin(0, -drawMargins.top()), qMax(0, drawMargins.right()), qMax(0, drawMargins.bottom())); if (mBoundingRect != boundingRect) { prepareGeometryChange(); mBoundingRect = boundingRect; emit boundingRectChanged(); } }
void Face::setBoundingRect(const QRectF &rect) { m_boundingRect = rect; emit boundingRectChanged(); }