Clean up some code

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3834 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-03-18 18:07:18 +00:00
parent e29ed4372a
commit 72c68c0d8d
10 changed files with 86 additions and 122 deletions

View File

@@ -54,12 +54,10 @@ bool centerToBottomDiagram (QGraphicsItem *item_to_center, Element *element_to_f
return false;
}
QRectF border = element_to_follow -> diagram() -> border();
QRectF border = element_to_follow -> diagram() -> border_and_titleblock.insideBorderRect();
QPointF point = element_to_follow -> sceneBoundingRect().center();
point.setY(border.height() -
element_to_follow -> diagram() -> border_and_titleblock.titleBlockHeight() -
item_to_center -> boundingRect().height());
point.setY(border.bottom() - item_to_center -> boundingRect().height() - 5);
point.rx() -= (item_to_center -> boundingRect().width()/2 +
item_to_center -> boundingRect().left()); //< we add boundingrect.left because this value can be négative