GNOME Bugzilla – Bug 142944
Paste should adjust the position of the pasted layer to fit into canvas
Last modified: 2004-09-17 09:14:24 UTC
1. Copy all image 2. Zoom in 3. Paste 4. The Floating pasted layer is offset so it doesn't fit into the image canvas The offset is probably good when pasting smaller parts of image so the pasted layer is visible on the view but if you paste the whole picture it should perfectly overlay itself.
Oh well, this probably can't be implemented in a way that makes everyone happy. We fixed the longstanding bug #78732 and now there's again complaints :(
We could special-case the paste behaviour for buffer-size >= image-size.
I think that the best solution would be to calculate the position using current algorithm and then readjust the position if the buffer would be (even partially) out of image in any direction. Of course if the buffer wouldn't completely fit in the image it should be adjusted only for top-left fitting.
Sounds reasonable.
This would be useful and probably very simply to implement. Any takers?
Created attachment 31637 [details] [review] Implements resolution as per comment #3
Created attachment 31640 [details] [review] a cleaned up version of above patch
I have basically rewritten it once more: 2004-09-17 Sven Neumann <sven@gimp.org> * app/core/gimp-edit.c (gimp_edit_paste): based on a patch from Joao S. O. Bueno: Ensure that the pasted layer is always within the image, if it fits and aligned at top left if it doesn't. Fixes bug #142944.