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 796073 - Zero-size selections affect movement of pasted content in weird ways
Zero-size selections affect movement of pasted content in weird ways
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.10.0
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2018-05-13 16:51 UTC by Michael Schumacher
Modified: 2018-05-15 22:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Schumacher 2018-05-13 16:51:45 UTC
Try the following:

- make sure something paste-able is available (e.g. by a prior copy)
- create as zero-size selection, either by invoking bug 796071 or adjusting the size yourself
- paste
- try to move the pasted content with the active selection tool

You should find that an unexpected drag towards the lower-right happens.
This can also be reproduced with GIMP 2.8, which is otherwise unaffected by bug 796071.

See also https://old.reddit.com/r/GIMP/comments/8ixiij/annoying_bugs_in_2100_with_selection_tools/
Comment 1 Michael Natterer 2018-05-15 22:01:15 UTC
This should fix it:

commit 918f60836ded0a5516576e5a82bd22ca51982f68
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue May 15 23:55:48 2018 +0200

    Bug 796073 - Zero-size selections affect movement of pasted content...
    
    ...in weird ways
    
    In gimp_rectangle_tool_button_press(), when the press triggers a
    GimpEditSelectionTool operation (like moving a floating selection),
    make sure we don't call COMMIT on a zero-size rectangle, because that
    would get special treatment by commit(). Instead, CANCEL a zero-size
    rectangle so stuff behaves as if it has never been there.

 app/tools/gimprectangleselecttool.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)