diff --git a/ChangeLog b/ChangeLog index 7284733700..c42e79f837 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-08-10 Martin Nordholts + + * app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap): + Always center the image after a wrap. I can't think of a case when + that shouldn't happen. + + * app/display/gimpdisplayshell-handlers.c + (gimp_display_shell_size_changed_detailed_handler): Centering + occurs implicitly after wrapping now, no need to do it explicitly. + + * app/display/gimpdisplayshell-scroll.c + (gimp_display_shell_scroll_center_image): Handle the no-image + case. + 2008-08-10 Martin Nordholts * app/display/gimpdisplayshell-scroll.[ch] diff --git a/app/display/gimpdisplayshell-handlers.c b/app/display/gimpdisplayshell-handlers.c index c9908810c3..61880ccaf7 100644 --- a/app/display/gimpdisplayshell-handlers.c +++ b/app/display/gimpdisplayshell-handlers.c @@ -492,7 +492,6 @@ gimp_display_shell_size_changed_detailed_handler (GimpImage *image, * has change size */ gimp_display_shell_shrink_wrap (shell, FALSE); - gimp_display_shell_scroll_center_image_on_next_size_allocate (shell); } else { diff --git a/app/display/gimpdisplayshell-scroll.c b/app/display/gimpdisplayshell-scroll.c index 336d29cb2f..eb0a141fa6 100644 --- a/app/display/gimpdisplayshell-scroll.c +++ b/app/display/gimpdisplayshell-scroll.c @@ -252,7 +252,8 @@ gimp_display_shell_scroll_center_image (GimpDisplayShell *shell, g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell)); - if (! shell->display) + if (! shell->display || + ! shell->display->image) return; target_offset_x = shell->offset_x; diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index 3e93465552..1e1fc065ca 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -1884,6 +1884,9 @@ gimp_display_shell_shrink_wrap (GimpDisplayShell *shell, } gtk_window_resize (GTK_WINDOW (shell), width, height); + + /* A wrap always means that we should center the image too */ + gimp_display_shell_scroll_center_image_on_next_size_allocate (shell); } }