mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user