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 549925 - incorrect math: adding/substracting empty selection deselects selection
incorrect math: adding/substracting empty selection deselects selection
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.4.x
Other All
: Normal minor
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-08-30 10:46 UTC by Maciej Pilichowski
Modified: 2008-10-30 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Maciej Pilichowski 2008-08-30 10:46:35 UTC
Please describe the problem:
0 is empty set
A is just a set

what is A u 0 ? in Gimp it is 0
what is A \ 0 ? in Gimp it is 0

It is even counterintuitive -- if I have selection and I remove one pixel from it I will get previous selection without that pixel. If I don't select anything, selection should be unchanged -- yet, Gimp removes entire selection

This is tiresome, because I am tired when polishing images, and I from time to time just click a mouse (accidentally), or when selecting (adding) one pixel my mouse was moved on LMB release, in effect I selected 0 pixel instead of 1, and then I have to undo last operation because I lost (thanks to Gimp) my selection

Steps to reproduce:
1. select anything 
2. change mode of selection to add or substract
3. select one pixel
4. observe the effect
5. select 0 pixels (just click)
6. entire selection is gone


Actual results:
Selection is removed

Expected results:
Following intuition and math -- no change when no selection is added or removed, so the selection will be preserved.

Does this happen every time?
Yes.

Other information:
Comment 1 Martin Nordholts 2008-08-30 12:57:15 UTC
Hi and thanks for the bug report!

This is the intended behavior. If you would like this change you should bring this up to discussion on the gimp-developer mailing list. If most people find the current behavior irritating we could consider changing how it. Thanks!
Comment 2 Maciej Pilichowski 2008-08-30 13:34:28 UTC
If this even intended behaviour it is contradiction of what the Gimp says. I select "__adding__" mode so how adding nothing to something can give me nothing?

In setting mode it makes perfect sense, because I (user) set nothing, but for the rest it does not hold.
Comment 3 Martin Nordholts 2008-08-30 13:42:35 UTC
When you click you are not making a selection but "executing". If you click within the selection with the Rectangle Select Tool, a rectangle will be wrapped around the selection. Clicking outside resets. I'm not opposed to changing this, but I'm opposed to discussing this further in this bug report where only a small fraction of people interested in GIMP development can participate. Hope you understand. Thanks!
Comment 4 Martin Nordholts 2008-09-24 21:20:05 UTC
Your suggestion makes sense so I've commited this to trunk, rev 27048:

2008-09-24  Martin Nordholts  <martinn@svn.gnome.org>

	Bug 549925 – incorrect math: adding/substracting empty selection
	deselects selection

	* app/tools/gimprectangleselecttool.c
	(gimp_rectangle_select_tool_execute): Be more intuitive when
	clicking outside the current selection for the selection modes Add
	and Subtract. More specifically, don't alter the selection mask at
	all.