Summary: | White background on layer paste | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Jonas <jonas.peche> |
Component: | Layer Stack | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | halla, m-kde |
Priority: | NOR | ||
Version First Reported In: | 5.2.9 | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Jonas
2025-04-17 07:56:27 UTC
I cannot reproduce this with the 5.2.9 appimage. Maybe some steps are missing ? (In reply to Halla Rempt from comment #1) > I cannot reproduce this with the 5.2.9 appimage. Maybe some steps are > missing ? I'm using the version on the AUR, but just tried the 5.2.9 appimage as well. I recorded the process, first copying a subset which is working as expected, then copying the whole layer with the white background thingy: https://streamable.com/sbdlep ๐๐งน Thanks for your comment! Automatically switching the status to REPORTED so the team can perform further triage. In the future you may also do this yourself when providing needed information. I dug into the source and tracked down what is happening exactly: The default layer has a default pixel with 100% opaque. When copying the full layer, this default pixel is not cleared. Specifically, here is the check whether a transparent default pixel is required on the copied, trimmed layers: https://github.com/KDE/krita/blob/8345697b0eedfbc1c38617c7344124e0b61557ea/libs/ui/actions/kis_selection_action_factories.cpp#L90 I personally don't think it's expected to copy the default pixel at all when a selection is active, especially when pasting into another document where there is already a background layer. So basically simplifying it down to `const bool needsTransparentPixel = selection && hasNonTransparentDefaultPixel;` such that it only keeps the default pixel when no selection is active (and thus the layer itself is meant to be copied) |