Fix QGIVP boundingRect
This commit is contained in:
@@ -409,12 +409,13 @@ void QGIView::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q
|
||||
QStyleOptionGraphicsItem myOption(*option);
|
||||
myOption.state &= ~QStyle::State_Selected;
|
||||
|
||||
//painter->drawRect(boundingRect()); //good for debugging
|
||||
// painter->drawRect(boundingRect()); //good for debugging
|
||||
|
||||
QGraphicsItemGroup::paint(painter, &myOption, widget);
|
||||
}
|
||||
|
||||
QRectF QGIView::customChildrenBoundingRect() {
|
||||
QRectF QGIView::customChildrenBoundingRect() const
|
||||
{
|
||||
QList<QGraphicsItem*> children = childItems();
|
||||
int dimItemType = QGraphicsItem::UserType + 106; // TODO: Magic number warning.
|
||||
int borderItemType = QGraphicsItem::UserType + 136; // TODO: Magic number warning
|
||||
|
||||
@@ -109,7 +109,7 @@ protected:
|
||||
// Preselection events:
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual QRectF customChildrenBoundingRect(void);
|
||||
virtual QRectF customChildrenBoundingRect(void) const;
|
||||
void dumpRect(char* text, QRectF r);
|
||||
|
||||
QString getPrefFont(void);
|
||||
|
||||
@@ -984,7 +984,9 @@ void QGIViewPart::dumpPath(const char* text,QPainterPath path)
|
||||
|
||||
QRectF QGIViewPart::boundingRect() const
|
||||
{
|
||||
return childrenBoundingRect();
|
||||
// return childrenBoundingRect();
|
||||
// return customChildrenBoundingRect();
|
||||
return QGIView::boundingRect();
|
||||
}
|
||||
|
||||
//QGIViewPart derived classes do not need a rotate view method as rotation is handled on App side.
|
||||
|
||||
Reference in New Issue
Block a user