mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 22:59:45 -09:00
FolderView tracks the pointer position on press, and uses that information on pointer move to start a drag or rubberband. However, when something resets the model (such as when a lot of files are deleted and each deletion resets the model), this information is reset. For the most part, this means that you can't rubberband while the deletions happen (you press, the press is reset, you move the mouse and nothing happens) which isn't great but also not too bad. However, if you manage to time it just right that the click and move happens fully within the short period between resets, you'll start the rubberband, then the reset changes the active rubberband to start at -1, -1 instead of the position you actually clicked. A somewhat easier to trigger condition is if some other process removes or adds files to the desktop while the user is mid-rubberband, such as a browser downloading things. In that case, the origin will also move from the clicked position to the top left while the rubberband is active. This is quite weird. So instead just update the rubberBand's origin if the rubberband is not active yet. We keep resetting the press state otherwise to keep the change as small as possible. This means that starting a rubberband while a large number of files are quickly added/removed one-by-one will continue to not work unless you get the timing exactly right. But having to briefly wait while the system is clearly doing something is less bad than suddenly changing the rubberband region mid-operation, and changing this can wait for the new desktop implementation (if feasible then). BUG: 526073 FIXED-IN: 6.9.0 |
||
|---|---|---|
| .. | ||
| desktop | ||
| folder | ||
| panel | ||
| CMakeLists.txt | ||