Commit e2aa8989 authored by Oleg Solovyov's avatar Oleg Solovyov Committed by Nate Graham

Check icon positions after move

Summary:
BUG: 402574

When we're moving a bunch of icons to the area which is already busy, we didn't check whether we're moving icons to different places.

Now we check additionally if we're moving icon to the place already taken by previously moved icons.

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D17809
parent aaebb510
......@@ -403,8 +403,10 @@ void Positioner::move(const QVariantList &moves) {
}
if (!fromIndices.contains(to) && !isBlank(to)) {
// find the next blank space
while (!isBlank(to) && from != to) {
/* find the next blank space
* we won't be happy if we're moving two icons to the same place
*/
while ((!isBlank(to) && from != to) || toIndices.contains(to)) {
to++;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment