After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142944 - Paste should adjust the position of the pasted layer to fit into canvas
Paste should adjust the position of the pasted layer to fit into canvas
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.0.x
Other Linux
: Normal minor
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-05-21 22:16 UTC by Tomas Mraz
Modified: 2004-09-17 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implements resolution as per comment #3 (1.57 KB, patch)
2004-09-17 05:50 UTC, Joao S. O. Bueno
none Details | Review
a cleaned up version of above patch (1.85 KB, patch)
2004-09-17 08:52 UTC, Sven Neumann
none Details | Review

Description Tomas Mraz 2004-05-21 22:16:12 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.
Comment 1 Sven Neumann 2004-05-22 10:28:38 UTC
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 :(
Comment 2 Sven Neumann 2004-05-26 11:04:57 UTC
We could special-case the paste behaviour for buffer-size >= image-size.
Comment 3 Tomas Mraz 2004-05-26 17:10:43 UTC
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.
Comment 4 Sven Neumann 2004-05-26 17:45:47 UTC
Sounds reasonable.
Comment 5 Sven Neumann 2004-09-16 19:33:22 UTC
This would be useful and probably very simply to implement. Any takers?
Comment 6 Joao S. O. Bueno 2004-09-17 05:50:53 UTC
Created attachment 31637 [details] [review]
Implements resolution as per comment #3
Comment 7 Sven Neumann 2004-09-17 08:52:03 UTC
Created attachment 31640 [details] [review]
a cleaned up version of above patch
Comment 8 Sven Neumann 2004-09-17 09:14:24 UTC
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.