Fix Move Selected Pixels tool for layers with transparency and nonstandard blend modes #820
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the semantics of the Move Selected Pixels tool so that the pixels that are being relocated within their layer do not get the layer's
Opacity
andBlendMode
baked into them -- and thus reapplied when the move operation is committed.I'm pretty sure this is the right thing to do. See issue #819.
I'm not sure if this is the right way to do it. I'm not all that familiar with the codebase. :-) It seems to fix it for me, though.
The one thing is that the selection layer ends up floating above the selected layer with 100% opacity until the move is committed. It would be even better if the selection appeared as though already merged into the selected layer -- so, with respect to the selected layer, it's 100% opaque, but with respect to the rest of the image, it is respecting the selected layer's opacity/blend mode.
Before committing the move:
After committing the move:
Notice that the part of the moved pixels that extends into the hole it left behind isn't now 25% opacity, it matches the rest of the image. And, the pixels that were moved on top of the rest of the layer (e.g. partially covering the curly red feature) simply replace them, instead of being blended with them.