From ab724377c0b74c36db7048615ccfa03fb3c22b5c Mon Sep 17 00:00:00 2001 From: Laurent Trinques Date: Sat, 16 Jul 2022 12:58:35 +0200 Subject: [PATCH] Fixed a bug with many slaves of type Other, whose XREFs overlap in list mode --- sources/qetgraphicsitem/crossrefitem.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sources/qetgraphicsitem/crossrefitem.cpp b/sources/qetgraphicsitem/crossrefitem.cpp index 217f4c68f..cc6ac3352 100644 --- a/sources/qetgraphicsitem/crossrefitem.cpp +++ b/sources/qetgraphicsitem/crossrefitem.cpp @@ -800,6 +800,11 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt) painter.drawArc(rr, 0, 180*16); } } + else if (flags &Other) + { + bounding_rect = QRectF(0, offset, 24, 20); + } + //Draw position text QRectF text_rect = painter.boundingRect( @@ -820,6 +825,7 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt) //a switch contact take place of two normal contact m_drawed_contacts += 2; + }else if(flags &Other){ //Draw position text QRectF text_rect = painter.boundingRect( @@ -837,6 +843,8 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt) else { m_hovered_contacts_map.insert(elmt, bounding_rect); } + m_drawed_contacts += 1; + return bounding_rect; } return bounding_rect;