Bug 446108 - Task items in the textual list is not updated after swapping two grouped task list
Summary: Task items in the textual list is not updated after swapping two grouped task...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-26 09:52 UTC by Fushan Wen
Modified: 2021-12-01 17:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2021-11-26 09:52:54 UTC
SUMMARY
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.


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

OBSERVED RESULT
Task items in A

EXPECTED RESULT
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
expression.

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

https://invent.kde.org/plasma/plasma-desktop/commit/351e676f9b593098cab7d701ce7893dd5559da7f