mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Improve last commit
This commit is contained in:
@@ -827,15 +827,10 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt)
|
|||||||
m_drawed_contacts += 2;
|
m_drawed_contacts += 2;
|
||||||
|
|
||||||
}else if(flags &Other){
|
}else if(flags &Other){
|
||||||
//Draw position text
|
|
||||||
QRectF text_rect = painter.boundingRect(
|
QRectF text_rect = painter.boundingRect(QRectF(30, offset, 5, 10), Qt::AlignLeft | Qt::AlignVCenter, str);
|
||||||
QRectF(30, offset+5, 5, 10),
|
painter.drawText(text_rect, Qt::AlignLeft | Qt::AlignVCenter, str);
|
||||||
Qt::AlignLeft | Qt::AlignVCenter,
|
|
||||||
str);
|
|
||||||
painter.drawText(text_rect,
|
|
||||||
Qt::AlignLeft | Qt::AlignVCenter,
|
|
||||||
str);
|
|
||||||
bounding_rect = bounding_rect.united(text_rect);
|
|
||||||
|
|
||||||
if (m_hovered_contacts_map.contains(elmt)) {
|
if (m_hovered_contacts_map.contains(elmt)) {
|
||||||
m_hovered_contacts_map.insert(elmt, bounding_rect);
|
m_hovered_contacts_map.insert(elmt, bounding_rect);
|
||||||
@@ -844,8 +839,7 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt)
|
|||||||
m_hovered_contacts_map.insert(elmt, bounding_rect);
|
m_hovered_contacts_map.insert(elmt, bounding_rect);
|
||||||
}
|
}
|
||||||
m_drawed_contacts += 1;
|
m_drawed_contacts += 1;
|
||||||
return bounding_rect;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return bounding_rect;
|
return bounding_rect;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user