Bug 507945

Summary: If desktop has only one icon that is in the topleft position and sorting is "unchanged", it won't be shown
Product: [Plasma] plasmashell Reporter: Akseli Lahtinen <akselmo>
Component: Desktop icons & Folder View widgetAssignee: Akseli Lahtinen <akselmo>
Status: RESOLVED FIXED    
Severity: normal CC: hein, nate
Priority: NOR Keywords: regression
Version First Reported In: 6.4.80   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Akseli Lahtinen 2025-08-06 14:01:08 UTC
SUMMARY

If user has only one item on desktop, and it's in top left position (so that positioner code thinks its in 0x0 coords), the item will not show up. Gammaray shows that the delegates are not even being created.

STEPS TO REPRODUCE
1. Make sure desktop folder is empty and sorting is set to "unchanged"
2. Add one item to desktop top-left corner by right clicking

OBSERVED RESULT
No icon appears

EXPECTED RESULT
Icon should show up

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.1
Kernel Version: 6.15.9-201.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 1 Bug Janitor Service 2025-08-06 14:25:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3145
Comment 2 Akseli Lahtinen 2025-08-07 10:25:35 UTC
Git commit 70bce5432bea9ae2cc1fca7b4090fe8be7a7e4dc by Akseli Lahtinen.
Committed on 07/08/2025 at 09:02.
Pushed by akselmo into branch 'master'.

Revert "Folder View: correct off-by-1 issue in Positioner::rowCount"

This reverts commit 6b8a192687a681b4ae38b158c87b194b19eda6fc.

M  +1    -1    containments/desktop/plugins/folder/positioner.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/70bce5432bea9ae2cc1fca7b4090fe8be7a7e4dc