``` if (aRect.y() == bRect.y()) return aRect.x() < bRect.x(); return (aRect.y() < aRect.y()); }); ``` https://invent.kde.org/kde/krita/-/blob/master/libs/ui/KisWindowLayoutResource.cpp#L212
Sorry for the late reply, but I'm not completely sure I see the copy/paste error? The layout of the code is atrocious, but I think it does what it should do?
See the a/b prefixes; in the last line it checks "aRect.y() < aRect.y()" which is of course always false. It probably should be `b` in the second one, but it would be good to check in context. Btw the line number is 200 now: https://invent.kde.org/graphics/krita/-/blob/master/libs/ui/KisWindowLayoutResource.cpp#L200
Git commit 77533803826b91afc573b9d249307391c4120902 by Agata Cacko. Committed on 22/08/2021 at 22:49. Pushed by tymond into branch 'master'. Fix typo in WindowLayoutResource sort screens lambda Before this commit, if the screens had different X values, the return value would be always false because the lambda checked aRect.y() < aRect.y() which can never be true since it's the same value on both sides. This commit fixes it by replacing one of them with bRect.y(). The direction is consistent with the previous line. M +1 -1 libs/ui/KisWindowLayoutResource.cpp https://invent.kde.org/graphics/krita/commit/77533803826b91afc573b9d249307391c4120902
Git commit 09637ff85051abb251df766a8c598691fe5464d1 by Halla Rempt, on behalf of Agata Cacko. Committed on 23/08/2021 at 08:57. Pushed by rempt into branch 'krita/5.0'. Fix typo in WindowLayoutResource sort screens lambda Before this commit, if the screens had different X values, the return value would be always false because the lambda checked aRect.y() < aRect.y() which can never be true since it's the same value on both sides. This commit fixes it by replacing one of them with bRect.y(). The direction is consistent with the previous line. (cherry picked from commit 77533803826b91afc573b9d249307391c4120902) M +1 -1 libs/ui/KisWindowLayoutResource.cpp https://invent.kde.org/graphics/krita/commit/09637ff85051abb251df766a8c598691fe5464d1