SUMMARY When I try to cycle through the blending modes of a layer using the up and down arrow keys, the ordering is inconsistent with the drop-down menu, and ends in an endless loop. STEPS TO REPRODUCE 1. Open an image with at least two layers. 2. Select the top layer. 3. From the layer blending mode drop-down, select the top mode (‘Addition’). 4. Keep pressing the ‘Down Arrow’ key. OBSERVED RESULT The order the various blending modes are chosen does not correspond to the order in the drop down. And after a few presses, one ends up with an endless cycle (‘Normal’, ‘Overlay’, ‘Parallel’, ‘Penumbra A’, ‘Penumbra B’, ‘Penumbra C’, ‘Penumbra D’, ‘Normal’, …). EXPECTED RESULT Pressing the down/up arrow keys should cycle the blending modes in the same order as they are shown in the drop-down. There should be no endless cycle. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20190724 KDE Plasma Version: 5.16.2 KDE Frameworks Version: 5.59.0 Qt Version: 5.13.0 Kernel Version: 5.2.1-1-default OS Type: 64-bit ADDITIONAL INFORMATION The initial list of blending modes cycled depend on the initial blending mode selected. But the endless cycle at the end is always identical (and begins with the ‘Normal’ blending mode).
Hi! I tried reproducing following the instructions you posted but I could not, up and down scrolled trough content in order, however it was not limited to visible blending modes. could you post a video to understan what is happening?
Created attachment 121800 [details] Video showing the bug in action Here’s a video showing how blending mode selection works when I press the down arrow key. Looking at the video, I noticed that right before cycling back to the ‘Normal’ mode, a different mode is selected, but just for a fraction of a second. Perhaps that’s a clue to what’s causing the bug?
(Removed NEEDSINFO status.)
Im not sure we can do much here, the behaviour seems to have changed in our framework of choice. Now when the cursor gets to a "category title" entry it resets to "Normal" This is not reproductible in macos as the blending combobox never keeps focus.
I've seen this happen on Linux as well, it might be a regression in Qt's handling of itemviews, or it might be something we can work around.
I can reproduce the issue on Windows
Git commit 66068abb8878a21fa2a3f0db3ec105e4105c7123 by Dmitry Kazakov. Committed on 18/08/2020 at 21:14. Pushed by dkazakov into branch 'krita/4.3'. Fix jumps in composite op combobox when using mouse wheel or keyboard 1) In KisCompositeOpComboBox::selectCompositeOp() we shouldn't reselect the same composite op all the time. Composite ops are not unique in the list (they are duplicated in favourite category), therefore such reselection may break the order. 2) keyPressEvent() and wheelEvent() should skip category items. Otherwise it would fallback to "Normal" blending mode. 3) KisSortedCategorizedListModel::indexOf() should search for the element in the order of the sorted model, not the original one. Obviously, we should first select from "Favourite" category. M +17 -2 libs/ui/kis_categorized_list_model.h M +152 -0 libs/ui/widgets/kis_cmb_composite.cc M +3 -0 libs/ui/widgets/kis_cmb_composite.h https://invent.kde.org/graphics/krita/commit/66068abb8878a21fa2a3f0db3ec105e4105c7123
Git commit b053074393d9080dbb269d83c8df6dcb18e54a67 by Dmitry Kazakov. Committed on 18/08/2020 at 21:14. Pushed by dkazakov into branch 'master'. Fix jumps in composite op combobox when using mouse wheel or keyboard 1) In KisCompositeOpComboBox::selectCompositeOp() we shouldn't reselect the same composite op all the time. Composite ops are not unique in the list (they are duplicated in favourite category), therefore such reselection may break the order. 2) keyPressEvent() and wheelEvent() should skip category items. Otherwise it would fallback to "Normal" blending mode. 3) KisSortedCategorizedListModel::indexOf() should search for the element in the order of the sorted model, not the original one. Obviously, we should first select from "Favourite" category. M +17 -2 libs/ui/kis_categorized_list_model.h M +152 -0 libs/ui/widgets/kis_cmb_composite.cc M +3 -0 libs/ui/widgets/kis_cmb_composite.h https://invent.kde.org/graphics/krita/commit/b053074393d9080dbb269d83c8df6dcb18e54a67