Commit 1d7e141c authored by Martin Nordholts's avatar Martin Nordholts Committed by Martin Nordholts

We need to set the scale before using it. Fixes at least

2008-08-31  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_set_initial_scale): We need to set the scale
	before using it. Fixes at least gimp_display_shell_fill() and
	Image -> Duplicate giving weird initial scales.

svn path=/trunk/; revision=26823
parent b12a8919
2008-08-31 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_set_initial_scale): We need to set the scale
before using it. Fixes at least gimp_display_shell_fill() and
Image -> Duplicate giving weird initial scales.
2008-08-30 Michael Natterer <mitch@gimp.org>
* tools/test-clipboard.c (test_clipboard_paste): fix length
......
......@@ -672,7 +672,6 @@ gimp_display_shell_set_initial_scale (GimpDisplayShell *shell,
gint shell_height;
gint screen_width;
gint screen_height;
gdouble new_scale;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
......@@ -684,16 +683,18 @@ gimp_display_shell_set_initial_scale (GimpDisplayShell *shell,
screen_width = gdk_screen_get_width (screen) * 0.75;
screen_height = gdk_screen_get_height (screen) * 0.75;
/* We need to zoom before we use SCALE[XY] */
gimp_zoom_model_zoom (shell->zoom, GIMP_ZOOM_TO, scale);
shell_width = SCALEX (shell, image_width);
shell_height = SCALEY (shell, image_height);
gimp_zoom_model_zoom (shell->zoom, GIMP_ZOOM_TO, scale);
if (shell->display->config->initial_zoom_to_fit)
{
/* Limit to the size of the screen... */
if (shell_width > screen_width || shell_height > screen_height)
{
gdouble new_scale;
gdouble current = gimp_zoom_model_get_factor (shell->zoom);
new_scale = current * MIN (((gdouble) screen_height) / shell_height,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment