mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Fix artefact on qgraphics scene when remove a linked element
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3534 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -129,6 +129,7 @@ void CommentItem::updateLabel() {
|
||||
text_bounding.adjust(-1,0,1,0); //adjust only for better visual
|
||||
painter.drawRoundedRect(text_bounding, 2, 2);
|
||||
|
||||
prepareGeometryChange();
|
||||
m_bounding_rect = text_bounding;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,7 @@ void CrossRefItem::updateProperties() {
|
||||
void CrossRefItem::updateLabel() {
|
||||
//init the shape and bounding rect
|
||||
m_shape_path = QPainterPath();
|
||||
prepareGeometryChange();
|
||||
m_bounding_rect = QRectF();
|
||||
|
||||
//init the painter
|
||||
@@ -183,7 +184,6 @@ void CrossRefItem::updateLabel() {
|
||||
qp.end();
|
||||
|
||||
autoPos();
|
||||
update();
|
||||
checkMustShow();
|
||||
}
|
||||
|
||||
@@ -303,6 +303,7 @@ void CrossRefItem::setUpCrossBoundingRect(QPainter &painter) {
|
||||
}
|
||||
|
||||
m_shape_path.addRect(default_bounding);
|
||||
prepareGeometryChange();
|
||||
m_bounding_rect = default_bounding;
|
||||
}
|
||||
|
||||
@@ -361,6 +362,7 @@ void CrossRefItem::drawHasContacts(QPainter &painter) {
|
||||
}
|
||||
|
||||
QRectF br(0, 0, 50, m_drawed_contacts*10+4);
|
||||
prepareGeometryChange();
|
||||
m_bounding_rect = br;
|
||||
m_shape_path.addRect(br);
|
||||
}
|
||||
@@ -518,6 +520,7 @@ void CrossRefItem::AddExtraInfo(QPainter &painter) {
|
||||
text_bounding.adjust(-1,0,1,0); //adjust only for better visual
|
||||
|
||||
m_shape_path.addRect(text_bounding);
|
||||
prepareGeometryChange();
|
||||
m_bounding_rect = m_bounding_rect.united(text_bounding);
|
||||
painter.drawRoundedRect(text_bounding, 2, 2);
|
||||
painter.restore();
|
||||
|
||||
Reference in New Issue
Block a user