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 560245 - Zoom selection always centered in the Navigation tab
Zoom selection always centered in the Navigation tab
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.6.2
Other All
: Normal minor
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-11-10 22:51 UTC by AdamW
Modified: 2008-11-15 08:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix-centering-issues-with-zoom-2008-11-11.patch (6.04 KB, patch)
2008-11-11 19:36 UTC, Martin Nordholts
none Details | Review

Description AdamW 2008-11-10 22:51:30 UTC
Please describe the problem:
When using the Zoom Out, Zoom In and the Zoom slider in the Navigation tab the selection rectangle is always centered no matter where it was located before.

Steps to reproduce:
1. Open picture
2. In the Navigation tab zoom in the picture using one of the buttons mentioned above and move the selection rectangle off the center.
3. Change the zoom ratio using Zoom In/Out or the slider.

Actual results:
The selection rectangle is reset to the center of the image.


Expected results:
The zoom selection rectangle stays at the same location in the navigation tab.

Does this happen every time?
Yes.

Other information:
This bug was introduced with GIMP 2.6.0
Comment 1 Sven Neumann 2008-11-10 23:26:25 UTC
This is basically the same bug that also causes the view to be centered if the Zoom actions from the menus are used. In fact the buttons in the navigation editor and the Zoom menu entries invoke the same actions. The pixel in the center of the display should always stay in the center of the display when using these actions. This somehow broke on the way to 2.6 and should be fixed.
Comment 2 Martin Nordholts 2008-11-11 19:36:52 UTC
Created attachment 122448 [details] [review]
fix-centering-issues-with-zoom-2008-11-11.patch

One needs to take into account the image center, not only the zoom focus point, when figuring out whether or not to center. The patch fixes this.

I will let the patch mature in my local tree before I commit it.
Comment 3 Martin Nordholts 2008-11-15 08:08:05 UTC
Corrected patch commited to trunk (rev 27651) and gimp-2-6:

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

	Bug 560245 – Zoom selection always centered in the Navigation tab

	* app/display/gimpdisplayshell-scale.c (gimp_display_shell_scale):
	Also take the image center and not only the zoom focus point into
	account when deciding whether or not to center the image after
	zoom.