mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Creation de la methode QET::correctAngle.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@813 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -199,9 +199,7 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
|
||||
// orientations actuelle et par defaut de l'element
|
||||
QET::Orientation ori_cur = elt -> orientation().current();
|
||||
QET::Orientation ori_def = elt -> orientation().defaultOrientation();
|
||||
applied_rotation = 90.0 * (ori_cur - ori_def);
|
||||
while (applied_rotation < 360.0) applied_rotation += 360.0;
|
||||
while (applied_rotation > 360.0) applied_rotation -= 360.0;
|
||||
applied_rotation = QET::correctAngle(90.0 * (ori_cur - ori_def));
|
||||
}
|
||||
if (applied_rotation == 90.0) p -> translate(1.0, -1.0);
|
||||
else if (applied_rotation == 180.0) p -> translate(-1.0, -1.0);
|
||||
|
||||
Reference in New Issue
Block a user