Bug 492155 - Sidebar doesn't update after deleting something from the context menu of one of its items
Summary: Sidebar doesn't update after deleting something from the context menu of one ...
Status: RESOLVED FIXED
Alias: None
Product: filelight
Classification: Applications
Component: general (show other bugs)
Version: 24.08.0
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-25 08:33 UTC by Eugene Shalygin
Modified: 2024-08-28 00:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2024-08-25 08:33:54 UTC
SUMMARY
After removing a directory, the left directory list goes out of sync. Invoking the "Delete" action from the context menu shows the next path in the confirmation dialog. If user is not careful, they can remove what they don't indent to remove.

STEPS TO REPRODUCE
1.  Scan a directory.
2.  Remove a directory using the right pane.
3.  Invoke the context menu action "Delete" on one of the last entries in the left pane.

OBSERVED RESULT
Filelight shows the next entry in the confirmation dialog.

EXPECTED RESULT
Filelight asks to confirm removal of the selected entry.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.6-gentoo (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-08-27 21:13:29 UTC
Can basically reproduce. The issue is that after deleting something from the sidebar, it doesn't update visually to reflect the removed item. This doesn't inherently result in data loss, but it does increase the risk of it for people who aren't paying attention. Definitely worth fixing, but reducing the severity.
Comment 2 Bug Janitor Service 2024-08-27 21:47:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/filelight/-/merge_requests/156
Comment 3 Harald Sitter 2024-08-27 23:19:13 UTC
Git commit 45a86c11d28120befd49b7eaaec5991dce3cf743 by Harald Sitter.
Committed on 27/08/2024 at 23:19.
Pushed by sitter into branch 'master'.

always reset the filemodel when the tree changes

otherwise we might be missing changes deeper inside the tree (i.e.
changes other than the root node)

M  +2    -4    src/fileModel.cpp

https://invent.kde.org/utilities/filelight/-/commit/45a86c11d28120befd49b7eaaec5991dce3cf743
Comment 4 Harald Sitter 2024-08-28 00:13:23 UTC
Git commit 6b2e0b823359495a6ab05a33c351ff44684ac922 by Harald Sitter.
Committed on 27/08/2024 at 23:34.
Pushed by sitter into branch 'release/24.08'.

always reset the filemodel when the tree changes

otherwise we might be missing changes deeper inside the tree (i.e.
changes other than the root node)


(cherry picked from commit 45a86c11d28120befd49b7eaaec5991dce3cf743)

0b504bc0 always reset the filemodel when the tree changes
4bb45bf8 Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Harald Sitter <sitter@kde.org>

M  +2    -4    src/fileModel.cpp

https://invent.kde.org/utilities/filelight/-/commit/6b2e0b823359495a6ab05a33c351ff44684ac922