Bug 443750

Summary: 2 issues about selecting and filling the layer.
Product: [Applications] krita Reporter: acc4commissions
Component: Tools/SelectionAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description acc4commissions 2021-10-14 23:14:39 UTC
SUMMARY
git d65c3f4

Selection > Bucket(fill) tool expands the layer size to the whole canvas, unless 'use selection as boundary' is checked.

STEPS TO REPRODUCE
1. Select a small area in the canvas.
2. Use bucket tool to it.

OBSERVED RESULT
The layer size expands to the maximum.

EXPECTED RESULT
It should stay small, the size about the selection itself.

SOFTWARE/OS VERSIONS
Windows: Win10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

There is also this issue that the layer size expands to the whole canvas if you select > invert > use 'fill with foreground/background color' shortcut, but I'm not sure it's relevant.
Comment 1 acc4commissions 2021-10-14 23:24:40 UTC
Additionally, 

- I think this whole fiasco is related to this.. > https://bugs.kde.org/show_bug.cgi?id=428259

- If the layer expands with this steps, applying filters to this layer becomes very slow, compared to other cases that the canvas is filled with other methods. Odd.
Comment 2 Halla Rempt 2022-06-28 12:31:14 UTC
Well, invert selection should do this. And with 5.0, I cannot reproduce the original issue.

* create a new image
* make a small selection
* fill with "use selection as boundary" unchecked
* select image->trim to current layer, and the image will be trimmed to only the filled part.