GNOME Bugzilla – Bug 532057
Crop Tool doesn't listen on "size-changed" signal for images
Last modified: 2008-05-10 07:19:09 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.
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.
(The problem also exists in GIMP 2.4, a backport should be considered.)
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.