[TD]fix cosmetic vertex outside frameRect is not selectable

- attempting to select a vertex outside the frameRect/boundingRect
  triggers hoverLeave event which hides the vertex.
This commit is contained in:
wandererfan
2025-11-06 11:17:42 -05:00
committed by Chris Hennes
parent f6c75c7838
commit 66a2dd984e

View File

@@ -799,6 +799,7 @@ QRectF QGIView::frameRect() const
continue;
}
if (
// we only want the area defined by the edges
child->type() != UserType::QGIRichAnno &&
child->type() != UserType::QGEPath &&
child->type() != UserType::QGMText &&
@@ -834,7 +835,9 @@ QRectF QGIView::customChildrenBoundingRect() const
child->type() != UserType::QGCustomBorder &&
child->type() != UserType::QGCustomLabel &&
child->type() != UserType::QGICaption &&
child->type() != UserType::QGIVertex &&
// we treat vertices as part of the boundingRect to allow loose vertices outside of the
// area defined by the edges as in frameRect()
// child->type() != UserType::QGIVertex &&
child->type() != UserType::QGICMark) {
QRectF childRect = mapFromItem(child, child->boundingRect()).boundingRect();
result = result.united(childRect);