From aa937084396b23e1a2695238b910478020dde9e6 Mon Sep 17 00:00:00 2001 From: wandererfan Date: Wed, 15 Mar 2023 09:26:19 -0400 Subject: [PATCH] [TD]skip center marks for view frame --- src/Mod/TechDraw/Gui/QGIView.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/Mod/TechDraw/Gui/QGIView.cpp b/src/Mod/TechDraw/Gui/QGIView.cpp index c0398536f1..f8de2bcd14 100644 --- a/src/Mod/TechDraw/Gui/QGIView.cpp +++ b/src/Mod/TechDraw/Gui/QGIView.cpp @@ -545,21 +545,23 @@ QRectF QGIView::customChildrenBoundingRect() const int editablePathItemType = QGraphicsItem::UserType + 301; // TODO: Magic number warning int movableTextItemType = QGraphicsItem::UserType + 300; int weldingSymbolItemType = QGraphicsItem::UserType + 340; + int centerMarkItemType = QGraphicsItem::UserType + 171; QRectF result; - for (QList::iterator it = children.begin(); it != children.end(); ++it) { - if (!(*it)->isVisible()) { + for (auto& child : children) { + if (!child->isVisible()) { continue; } - if ( ((*it)->type() != dimItemType) && - ((*it)->type() != leaderItemType) && - ((*it)->type() != textLeaderItemType) && - ((*it)->type() != editablePathItemType) && - ((*it)->type() != movableTextItemType) && - ((*it)->type() != borderItemType) && - ((*it)->type() != labelItemType) && - ((*it)->type() != weldingSymbolItemType) && - ((*it)->type() != captionItemType) ) { - QRectF childRect = mapFromItem(*it, (*it)->boundingRect()).boundingRect(); + if ( (child->type() != dimItemType) && + (child->type() != leaderItemType) && + (child->type() != textLeaderItemType) && + (child->type() != editablePathItemType) && + (child->type() != movableTextItemType) && + (child->type() != borderItemType) && + (child->type() != labelItemType) && + (child->type() != weldingSymbolItemType) && + (child->type() != captionItemType) && + (child->type() != centerMarkItemType)) { + QRectF childRect = mapFromItem(child, child->boundingRect()).boundingRect(); result = result.united(childRect); //result = result.united((*it)->boundingRect()); }