Canonically calculate scale to use for zoom-focus calculations so that it
2008-08-28 Martin Nordholts <martinn@svn.gnome.org> * app/display/gimpdisplayshell-scale.c (gimp_display_shell_scale_to): Canonically calculate scale to use for zoom-focus calculations so that it also works when not in Dot by dot-mode. svn path=/trunk/; revision=26805
This commit is contained in:

committed by
Martin Nordholts

parent
2975f815a8
commit
3cfd2a33c0
@ -1,3 +1,10 @@
|
||||
2008-08-28 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/display/gimpdisplayshell-scale.c
|
||||
(gimp_display_shell_scale_to): Canonically calculate scale to use
|
||||
for zoom-focus calculations so that it also works when not in Dot
|
||||
by dot-mode.
|
||||
|
||||
2008-08-28 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/core/gimpimage.[ch]: Make the size-changed-detailed signal
|
||||
|
@ -751,6 +751,7 @@ gimp_display_shell_scale_to (GimpDisplayShell *shell,
|
||||
gint viewport_x,
|
||||
gint viewport_y)
|
||||
{
|
||||
gdouble scale_x, scale_y;
|
||||
gdouble image_focus_x, image_focus_y;
|
||||
gint target_offset_x, target_offset_y;
|
||||
|
||||
@ -766,8 +767,10 @@ gimp_display_shell_scale_to (GimpDisplayShell *shell,
|
||||
&image_focus_y,
|
||||
FALSE);
|
||||
|
||||
target_offset_x = scale * image_focus_x - viewport_x;
|
||||
target_offset_y = scale * image_focus_y - viewport_y;
|
||||
gimp_display_shell_calculate_scale_x_and_y (shell, scale, &scale_x, &scale_y);
|
||||
|
||||
target_offset_x = scale_x * image_focus_x - viewport_x;
|
||||
target_offset_y = scale_y * image_focus_y - viewport_y;
|
||||
|
||||
/* Note that we never come here if we need to
|
||||
* resize_windows_on_zoom
|
||||
|
Reference in New Issue
Block a user