Only wrap duration once in animationTime()

The zoomDuration is already wrapped in animationTime() during
reconfigure. So doing it twice is wrong.

REVIEW: 107463
This commit is contained in:
Martin Gräßlin 2012-11-25 19:00:31 +01:00
parent 313b1833bc
commit 40400167b9

View file

@ -1071,7 +1071,7 @@ void DesktopGridEffect::setup()
qDeleteAll(hoverTimeline);
hoverTimeline.clear();
for (int i = 0; i < effects->numberOfDesktops(); i++) {
QTimeLine *newTimeline = new QTimeLine(animationTime(zoomDuration), this);
QTimeLine *newTimeline = new QTimeLine(zoomDuration, this);
newTimeline->setCurveShape(QTimeLine::EaseInOutCurve);
hoverTimeline.append(newTimeline);
}
@ -1292,7 +1292,7 @@ void DesktopGridEffect::desktopsAdded(int old)
const int desktop = effects->numberOfDesktops();
for (int i = old; i <= effects->numberOfDesktops(); i++) {
// add a timeline for the new desktop
QTimeLine *newTimeline = new QTimeLine(animationTime(zoomDuration), this);
QTimeLine *newTimeline = new QTimeLine(zoomDuration, this);
newTimeline->setCurveShape(QTimeLine::EaseInOutCurve);
hoverTimeline.append(newTimeline);
}