Previously the particle system was only applying the translaton of the
relative transfrom from any emitters. Now the full transform is used.
Task-number: QTBUG-25518
Change-Id: I4c654837c37dbef8f6f407387ce4ea82cb3b821c
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
void QQuickParticleSystem::emitParticle(QQuickParticleData* pd)
{// called from prepareNextFrame()->emitWindow - enforce?
//Account for relative emitter position
- QPointF offset = this->mapFromItem(pd->e, QPointF(0, 0));
- if (!offset.isNull()) {
- pd->x += offset.x();
- pd->y += offset.y();
+ bool okay = false;
+ QTransform t = pd->e->itemTransform(this, &okay);
+ if (okay) {
+ qreal tx,ty;
+ t.map(pd->x, pd->y, &tx, &ty);
+ pd->x = tx;
+ pd->y = ty;
}
finishNewDatum(pd);