When selecting with the contiguous selection tool set to the 'color reference layer' method, all options are ignored and the entire canvas is selected if a selection already exists. To recreate: - Make a box on a color labeled layer. - Make a selection by any method (lasso, contiguous, etc) - Set the contiguous selection tool to 'sample color label' and set it to the color of the box layer. - Make a selection inside the box What happens: - The entire canvas is selected. (Edge case: If action type is set to 'subtract', it will leave the original selection unselected, showing that whatever function is creating the new selection is returning the full canvas and ignoring the reference layer entirely.) What should happen: - The selection fills the box, or if shift is held, should add the box to the initial selection. This bug doesn't occur if there is no previous selection, or if the reference layer is single/full image. Tt works as expected. 6060b8ee
It also happens with the fill tool. Which makes me think is something in the scanline fill class. It already happens before my last changes, so it may be related to the "close gaps" feature, which changed the scanline fill.
After digging a bit, it may be that the reference image produced by KisMergeLabeledLayersCommand if not right if there is a selection.
Git commit 66dd431ca6d548ca7e169cc7c66568df3243f417 by Deif Lou. Committed on 02/05/2024 at 09:51. Pushed by deiflou into branch 'master'. Fix issue in KisMergeLabeledLayersCommand when masks where involved M +8 -8 libs/image/commands_new/KisMergeLabeledLayersCommand.cpp M +1 -1 libs/image/commands_new/KisMergeLabeledLayersCommand.h https://invent.kde.org/graphics/krita/-/commit/66dd431ca6d548ca7e169cc7c66568df3243f417
Git commit e6c53e4e2943a6ad4bc1fe365eef02a9dcd472eb by Deif Lou. Committed on 07/06/2024 at 00:32. Pushed by deiflou into branch 'krita/5.2'. Fix issue in KisMergeLabeledLayersCommand when masks where involved (cherry picked from commit 66dd431ca6d548ca7e169cc7c66568df3243f417) Co-authored-by: Deif Lou <ginoba@gmail.com> M +8 -8 libs/image/commands_new/KisMergeLabeledLayersCommand.cpp M +1 -1 libs/image/commands_new/KisMergeLabeledLayersCommand.h https://invent.kde.org/graphics/krita/-/commit/e6c53e4e2943a6ad4bc1fe365eef02a9dcd472eb