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 560903 - Explicit zooming with e.g. '1' should handle zoom-focus better
Explicit zooming with e.g. '1' should handle zoom-focus better
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.6.2
Other All
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-11-15 10:15 UTC by Martin Nordholts
Modified: 2008-11-15 10:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Nordholts 2008-11-15 10:15:22 UTC
GIMP should better calculate the zoom focus point (what image pixel that stays stationary in viewport coordinates) when doing explicit zooming e.g. by pressing '1' to get a zoom factor of 100%.

Steps for the use case:
1. Create a new default-sized image
2. Resize the image window so it is smaller than the image at 100% zoom
3. Paint a dot in the upper left corner of the image and zoom in on it
4. Hold the mouse pointer on the dot and press '1'

Expected result:
The dot is still under the mouse cursor after the zoom out

Actual result:
The image center is erroneously used as the zoom focus point

This use case broke with the fix for Bug 553534 – centering issues after image scaling and setting zoom to 100%.
Comment 1 Martin Nordholts 2008-11-15 10:31:00 UTC
Fixed in trunk (rev 27653) and gimp-2-6:

2008-11-15  Martin Nordholts  <martinn@svn.gnome.org>

	Bug 560903 – Explicit zooming with e.g. '1' should handle
	zoom-focus better

	* app/display/display-enums.h: Added
	GIMP_ZOOM_FOCUS_RETAIN_CENTERING_ELSE_BEST_GUESS.

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_get_zoom_focus): Take the new enum into
	account; if the image is centered, keep it centered, else use the
	best-guess method.

	* app/actions/view-commands.c (view_zoom_explicit_cmd_callback):
	Use the new enum for explicit zooming.

	* app/display/display-enums.c: Regenerated.