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:
blacksun
2014-12-07 15:47:58 +00:00
parent 438f98d34b
commit 5ab965588b
2 changed files with 8 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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();