backport 3d vector fix

svn path=/branches/KDE/4.4/kdelibs/; revision=1072234
This commit is contained in:
Marco Martin 2010-01-09 17:31:21 +00:00
parent b24cb0ce38
commit 7dce4cbec8

View File

@ -89,12 +89,15 @@ void RotationAnimation::updateState(QAbstractAnimation::State newState, QAbstrac
if (axis() == Qt::XAxis) { if (axis() == Qt::XAxis) {
switch (reference()) { switch (reference()) {
case Center: case Center:
vector.setX(widgetWidth/2);
vector.setY(widgetHeight/2); vector.setY(widgetHeight/2);
break; break;
case Up: case Up:
vector.setX(widgetWidth/2);
vector.setY(0); vector.setY(0);
break; break;
case Down: case Down:
vector.setX(widgetWidth/2);
vector.setY(widgetHeight); vector.setY(widgetHeight);
break; break;
} }
@ -103,12 +106,15 @@ void RotationAnimation::updateState(QAbstractAnimation::State newState, QAbstrac
switch (reference()) { switch (reference()) {
case Center: case Center:
vector.setX(widgetWidth/2); vector.setX(widgetWidth/2);
vector.setY(widgetHeight/2);
break; break;
case Left: case Left:
vector.setX(0); vector.setX(0);
vector.setY(widgetHeight/2);
break; break;
case Right: case Right:
vector.setX(widgetWidth); vector.setX(widgetWidth);
vector.setY(widgetHeight/2);
break; break;
} }