https://bugs.kde.org/show_bug.cgi?id=473088
--- Comment #36 from off...@hantsch.co.at --- OMG. I know why I do it "by hands" with findfirst/findnext. A little bit ancient, but it cannot fail. :) Thanks for explaining. Am Montag, 21. August 2023, 17:54:47 CEST schrieben Sie: > https://bugs.kde.org/show_bug.cgi?id=473088 > > --- Comment #35 from Fushan Wen <qydwhotm...@gmail.com> --- > Git commit 79f494d6c61ff7e1e4f4e618447e322eda89ac84 by Fushan Wen. > Committed on 21/08/2023 at 17:38. > Pushed by fusionfuture into branch 'master'. > > 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. > > M +75 -0 wallpapers/image/plugin/autotests/test_slidefiltermodel.cpp > M +25 -6 wallpapers/image/plugin/slidefiltermodel.cpp > > https://invent.kde.org/plasma/plasma-workspace/-/commit/79f494d6c61ff7e1e4f4 > e618447e322eda89ac84 -- You are receiving this mail because: You are watching all bug changes.