amount of 0 should be a no-op; fast and more accurate results

BUG:263179

svn path=/trunk/KDE/kdelibs/; revision=1214508
This commit is contained in:
Aaron J. Seigo 2011-01-15 01:07:01 +00:00
parent 007aeb35fb
commit ce0885ccf3

View File

@ -163,6 +163,10 @@ QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
return from;
}
if (qFuzzyCompare(amount, 0)) {
return from;
}
QRect startRect(from.rect());
QRect targetRect(to.rect());
QSize pixmapSize = startRect.size().expandedTo(targetRect.size());