mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-30 23:59:59 +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
|
||||
|
||||
@@ -318,7 +318,7 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
|
||||
m_help_line_a -> setPen(pen);
|
||||
}
|
||||
|
||||
QRectF rect = diagram() -> drawingRect();
|
||||
QRectF rect = diagram() -> border_and_titleblock.insideBorderRect();
|
||||
QLineF line;
|
||||
|
||||
if (Qet::isHorizontal(orientation()))
|
||||
@@ -376,7 +376,7 @@ void Terminal::drawHelpLine(bool draw)
|
||||
QLineF Terminal::HelpLine() const
|
||||
{
|
||||
QPointF scene_dock = dockConductor();
|
||||
QRectF rect = diagram() -> drawingRect();
|
||||
QRectF rect = diagram() -> border_and_titleblock.insideBorderRect();
|
||||
|
||||
QLineF line(scene_dock , QPointF());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user