aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabio Falsini <falsinsoft@gmail.com>2021-01-28 20:46:21 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-06 00:17:03 +0000
commitb4e57491311ccbcc9da09a5d04e1fc6cec397a41 (patch)
tree8c5cb919f7802f27096ae345b8b02c42d0dea1c8 /src
parent6de9ec7d721ecd2a72beb31ccb8a05bf0ed5884b (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. Change-Id: Ic937a6d7aea65368cceb1405bb81ef1502d988a5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d0b1bef8b889ab852eaf906fdc9cd4219238872e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/particles/qquickitemparticle.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/particles/qquickitemparticle.cpp b/src/particles/qquickitemparticle.cpp
index 873f03ac7f..6655666396 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;
}
}