TechDraw: Fix center marks not showing

This commit is contained in:
Ryan Kembrey
2025-09-07 23:05:59 +10:00
parent f33413bbef
commit a634a52061

View File

@@ -106,7 +106,7 @@ QVariant QGIViewPart::itemChange(GraphicsItemChange change, const QVariant& valu
if (!selectState && !isUnderMouse()) {
// hide everything
for (auto& child : childItems()) {
if (child->type() == UserType::QGIVertex) {
if (child->type() == UserType::QGIVertex || child->type() == UserType::QGICMark) {
child->hide();
}
}
@@ -125,7 +125,8 @@ QVariant QGIViewPart::itemChange(GraphicsItemChange change, const QVariant& valu
// hide any non-selected vertices.
if (!isUnderMouse()) {
for (auto* child : childItems()) {
if (child->type() == UserType::QGIVertex && !child->isSelected()) {
if ((child->type() == UserType::QGIVertex || child->type() == UserType::QGICMark) &&
!child->isSelected()) {
child->hide();
}
}
@@ -1321,7 +1322,7 @@ void QGIViewPart::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
QGIView::hoverEnterEvent(event);
for (auto& child : childItems()) {
if (child->type() == UserType::QGIVertex) {
if (child->type() == UserType::QGIVertex || child->type() == UserType::QGICMark) {
child->show();
}
}
@@ -1334,7 +1335,7 @@ void QGIViewPart::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
QGIView::hoverLeaveEvent(event);
for (auto& child : childItems()) {
if (child->type() == UserType::QGIVertex &&
if ((child->type() == UserType::QGIVertex || child->type() == UserType::QGICMark) &&
!child->isSelected()) {
child->hide();
}