https://bugs.kde.org/show_bug.cgi?id=473088
--- Comment #39 from Fushan Wen <qydwhotm...@gmail.com> --- Git commit f26f7b1ada1b6d8c8943d6f457ca68449951dd87 by Fushan Wen. Committed on 21/08/2023 at 20:47. Pushed by fusionfuture into branch 'Plasma/5.27'. wallpapers/image: fix random order update logic In SlideFilterModel, an added/deleted wallpaper is not always the last one, so `first` and `last` also needs to be taken into account. `m_randomOrder` stores the row numbers of the source model in a specific order. When a new wallpaper is added, the `first` argument is not always equal to `sourceModel->rowCount()`, and when the condition is not met, all the existing row numbers in `m_randomOrder` that >= `first` need to be increased by 1 (or the number of new wallpapers), to make space for new wallpapers. Vice versa when wallpapers are removed. (cherry picked from commit 79f494d6c61ff7e1e4f4e618447e322eda89ac84) M +62 -0 wallpapers/image/plugin/autotests/test_slidefiltermodel.cpp M +26 -6 wallpapers/image/plugin/slidefiltermodel.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/f26f7b1ada1b6d8c8943d6f457ca68449951dd87 -- You are receiving this mail because: You are watching all bug changes.