Bug 486419 - Selection fills entire canvas if selection already exists when using reference layers.
Summary: Selection fills entire canvas if selection already exists when using referenc...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Selection (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-01 21:57 UTC by Ralek Kolemios
Modified: 2024-06-07 00:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralek Kolemios 2024-05-01 21:57:15 UTC
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
Comment 1 Deif Lou 2024-05-02 08:12:00 UTC
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.
Comment 2 Deif Lou 2024-05-02 08:40:48 UTC
After digging a bit, it may be that the reference image produced by KisMergeLabeledLayersCommand if not right if there is a selection.
Comment 3 Deif Lou 2024-05-02 09:52:18 UTC
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
Comment 4 Deif Lou 2024-06-07 00:32:56 UTC
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