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 336259 - problems when scaling by height in inches
problems when scaling by height in inches
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.2.x
Other All
: Normal minor
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-03-27 22:56 UTC by Doug Schwer
Modified: 2008-01-15 13:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Doug Schwer 2006-03-27 22:56:09 UTC
Please describe the problem:
When attempting to scale an image by height using inches (instead of pixels),
the value for the height will sometimes reset to the original value when
pressing "Scale" or enter.  Behavior is not consistent, sometimes it will scale
the image, sometimes it will not.  This behavior is not noticed when units are
set to Pixels.

Steps to reproduce:
1. Load up an image.
2. Go into scale
3. Change units to inches
4. Change the height.
5. Press Enter.



Actual results:
It will reset the height to the original height.

Expected results:
It should reset the width so that the aspect ratio remains constant given the
new height.

Does this happen every time?
No.

Other information:
I am using Fedora Core 5 with the x86_64 architecture, problem was not seen on
an i386 computer.  Problem is present both in GIMP 2.2.10 and 2.2.8
Comment 1 weskaggs 2006-05-19 20:37:21 UTC
This problem affects not just "Scale Image" but also "Resize Canvas" and "Scale Layer", in all recent versions of GIMP.  The problem is that the test for whether X or Y has changed, in the chainbutton code in gimp_coordinates_callback(), did not allow for the rounding error that occurs when the units are changed.  Fixed by applying ROUND() to the new and old refvals before comparing them.

I am only applying this change to HEAD for now (and changing target to 2.4), but it would be simple to apply to 2.2 as well.

2006-05-19  Bill Skaggs  <weskaggs@primate.ucdavis.edu>

	* libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback): 
	use ROUND() to prevent incorrect chainbutton logic.  Fixes
	bug #336259.
Comment 2 Sven Neumann 2006-05-22 09:16:28 UTC
Reopening and setting milestone to 2.2. This needs to be fixed in the 2.2 tree. That was why the 2.2 milestone was set in the first place. Please respect this.
Comment 3 weskaggs 2006-05-22 15:39:23 UTC
Okay, changes applied to the 2-2 branch as well:

2006-5-22  Bill Skaggs  <weskaggs@primate.ucdavis.edu>

	Merge from Head:
	
	* libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback): 
	use ROUND() to prevent incorrect chainbutton logic.  Fixes
	bug #336259.