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 532057 - Crop Tool doesn't listen on "size-changed" signal for images
Crop Tool doesn't listen on "size-changed" signal for images
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-05-07 21:48 UTC by Martin Nordholts
Modified: 2008-05-10 07:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
crop-tool-and-size-changed-signal-2008-05-07.patch (3.02 KB, patch)
2008-05-07 21:53 UTC, Martin Nordholts
committed Details | Review

Description Martin Nordholts 2008-05-07 21:48:33 UTC
The default aspect ratio when there is no active Crop Tool rectangle is image_width:image_height. Currently the Crop Tool does not get notified when the size of an image changes, and consequently fails to update the default aspect ratio for example when undoing a crop, or when changing the size of the canvas.
Comment 1 Martin Nordholts 2008-05-07 21:53:48 UTC
Created attachment 110552 [details] [review]
crop-tool-and-size-changed-signal-2008-05-07.patch

Suggested patch.

My hesitation is regarding an alternative approach; to make GimpContext::"image-changed" also pass the old GimpImage as a parameter and not just the new one. That way there would be no need to keep track of the current_image in GimpCropTool.
Comment 2 Martin Nordholts 2008-05-07 21:59:04 UTC
(The problem also exists in GIMP 2.4, a backport should be considered.)
Comment 3 Martin Nordholts 2008-05-10 07:19:09 UTC
Commited to:
trunk, rev 25598
gimp-2-4, rev 25600

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

	* app/tools/gimpcroptool.[ch]: Keep track of the current image and
	manage a subscription to "size-changed" so that default aspect
	ratio is properly updated. (Bug #532057.)
	(gimp_crop_tool_execute): No need to explicitly call
	gimp_crop_tool_update_option_defaults() any longer.