Bug 446108

Summary: Task items in the textual list is not updated after swapping two grouped task list
Product: [Plasma] plasmashell Reporter: Fushan Wen <qydwhotmail>
Component: Task Manager and Icons-Only Task ManagerAssignee: Eike Hein <hein>
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=446105
Latest Commit: Version Fixed In: 5.24

Description Fushan Wen 2021-11-26 09:52:54 UTC
When there is two grouped tasks named A and B, and the position of B is swapped with A (drag B), if I open the textual list of B, I can still see old items in A.

1. Prepare two grouped tasks named A and B
2. Swap the position of B with A (Drag B)
3. Click B

Task items in A

Task items in B
Comment 1 Bug Janitor Service 2021-11-26 12:36:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/717
Comment 2 Fushan Wen 2021-12-01 17:24:21 UTC
Git commit 351e676f9b593098cab7d701ce7893dd5559da7f by Fushan Wen.
Committed on 01/12/2021 at 15:47.
Pushed by ngraham into branch 'master'.

taskmanager: Update rootIndex when visibility is changed

When there are two grouped tasks named A and B, and the position
of B is swapped with A (by dragging B), user can still see old
items of A in the textual list of grouped tasks B.

This is because in the original binding expression, both visualParent
and itemIndex are not changed, so QML will not re-evaluate the

To only update rootIndex when `groupDialog.visible` is true,
`Binding.when` is used, and `Binding.RestoreNone` is to avoid
sudden changes in height.

M  +6    -1    applets/taskmanager/package/contents/ui/GroupDialog.qml