diff options
author | Fabio Falsini <falsinsoft@gmail.com> | 2021-01-28 20:46:21 +0100 |
---|---|---|
committer | Fabio Falsini <falsinsoft@gmail.com> | 2021-02-05 23:37:26 +0100 |
commit | d0b1bef8b889ab852eaf906fdc9cd4219238872e (patch) | |
tree | c6dbb4530f50725827a7e2c13fbdfb6dce1d0e28 /src/particles | |
parent | 07a9cc199f101a11c83a9d75e5eb198134c75a8d (diff) |
QQuickItemParticle give() method kill particle
Currently removing an item connected to a particle
only invalidate the particle that will be reused for
the next item set. This has the effect that the new
item inserted appears in the same position as the
old one just removed. This patch force killing the
particle to assign next item to a new particle
starting from initial position.
Pick-to: 5.15 6.0 6.1
Change-Id: Ic937a6d7aea65368cceb1405bb81ef1502d988a5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/particles')
-rw-r--r-- | src/particles/qquickitemparticle.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/particles/qquickitemparticle.cpp b/src/particles/qquickitemparticle.cpp index ce254c212d..60d368a2a3 100644 --- a/src/particles/qquickitemparticle.cpp +++ b/src/particles/qquickitemparticle.cpp @@ -165,6 +165,7 @@ void QQuickItemParticle::give(QQuickItem *item) if (data->delegate == item){ m_deletables << item; data->delegate = nullptr; + m_system->groupData[groupId]->kill(data); return; } } |